From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/notification/icon/index.html | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 files/ja/web/api/notification/icon/index.html (limited to 'files/ja/web/api/notification/icon/index.html') diff --git a/files/ja/web/api/notification/icon/index.html b/files/ja/web/api/notification/icon/index.html new file mode 100644 index 0000000000..be7de58481 --- /dev/null +++ b/files/ja/web/api/notification/icon/index.html @@ -0,0 +1,66 @@ +--- +title: Notification.icon +slug: Web/API/Notification/icon +tags: + - API + - DOM + - Notification + - Notifications + - Notifications API + - Property + - Reference + - icon + - プロパティ + - 通知 +translation_of: Web/API/Notification/icon +--- +

{{APIRef("Web Notifications")}}{{AvailableInWorkers}}{{securecontext_header}}

+ +

icon は {{domxref("Notification")}} インターフェイスの読取専用プロパティで、 {{domxref("Notification.Notification","Notification()")}} コンストラクターの icon オプションで指定された、通知の一部として表示されるアイコンの URL を含みます。

+ +

構文

+ +
var icon = Notification.icon;
+
+ +

+ +

{{domxref("USVString")}} です。

+ +

+ +

To-do リストアプリ (ライブで実行するアプリを表示) では、 {{domxref("Notification.Notification","Notification()")}} コンストラクターを使用して通知を発行し、希望する本文、アイコン、タイトルを指定するために引数を渡します。

+ +
var notification = new Notification('To do list', {
+  body: text,
+  icon: img
+});
+ +

仕様書

+ + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('Web Notifications','#dom-notification-icon','icon')}}{{Spec2('Web Notifications')}}Living standard
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.Notification.icon")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf