注:
この機能は Web Worker 内で利用可能です。安全なコンテキスト用
この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
body
は Notification
インターフェイスの読取専用プロパティで、 Notification()
コンストラクターの body
オプションで指定された通知の本文文字列を返します。
構文
var body = Notification.body;
値
DOMString
です。
例
function spawnNotification(theBody, theIcon, theTitle) {
var options = {
body: theBody,
icon: theIcon
}
var n = new Notification(theTitle, options);
console.log(n.body);
}
仕様書
仕様書 | 状態 | 備考 |
---|---|---|
Notifications API body の定義 |
現行の標準 | Living standard |
ブラウザーの互換性
BCD tables only load in the browser