NotificationEvent.NotificationEvent()
NotificationEvent()
コンストラクターは、新しい NotificationEvent
オブジェクトを生成します。
構文
var myNotificationEvent = new NotificationEvent(type, NotificationEventInit);
引数
type
-
TBD
NotificationEventInit
省略可-
イベントが配信される通知として使用される
Notification
オブジェクトを含む辞書オブジェクト。この仕様書の後の草稿では、このパラメータはオプションではありません。
例
var n = new Notification('Hello');
var init = { notification: n };
var myNotificationEvent = new NotificationEvent(type, init);
仕様書
Specification |
---|
Notifications API Standard # dom-notificationevent-notificationevent |
ブラウザーの互換性
BCD tables only load in the browser