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/body/index.html | 69 +++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 files/ja/web/api/notification/body/index.html (limited to 'files/ja/web/api/notification/body') diff --git a/files/ja/web/api/notification/body/index.html b/files/ja/web/api/notification/body/index.html new file mode 100644 index 0000000000..999fec236f --- /dev/null +++ b/files/ja/web/api/notification/body/index.html @@ -0,0 +1,69 @@ +--- +title: Notification.body +slug: Web/API/Notification/body +tags: + - API + - BODY + - DOM + - Notification + - Notifications + - Notifications API + - Property + - Reference + - プロパティ + - 通知 +translation_of: Web/API/Notification/body +--- +

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

+ +

body は {{domxref("Notification")}} インターフェイスの読取専用プロパティで、 {{domxref("Notification.Notification","Notification()")}} コンストラクターの body オプションで指定された通知の本文文字列を返します。

+ +

構文

+ +
var body = Notification.body;
+
+ +

+ +

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

+ +

+ +
function spawnNotification(theBody, theIcon, theTitle) {
+  var options = {
+      body: theBody,
+      icon: theIcon
+  }
+  var n = new Notification(theTitle, options);
+
+  console.log(n.body);
+}
+ +

仕様書

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

ブラウザーの互換性

+ + + +

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

+ +

関連情報

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