A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/ja/docs/Web/API/NotificationEvent/NotificationEvent below:

NotificationEvent: NotificationEvent() コンストラクター - Web API

NotificationEvent: NotificationEvent() コンストラクター

Baseline 2023

Newly available

メモ: この機能はサービスワーカー内でのみ利用可能です。

NotificationEvent() コンストラクターは、新しい NotificationEvent オブジェクトを生成します。

構文
new NotificationEvent(type, options)
引数
type

イベントの名前の文字列。 大文字と小文字が区別され、ブラウザーでは notificationclick または notificationclose に設定します。

options

オブジェクトで、ExtendableEvent() で定義されているプロパティに加え、以下のプロパティを持つことができます。

notification

イベントが配信される際に通知として使用する Notification オブジェクト。

action 省略可

通知に関連付けられたアクション。既定では "" です。

返値

新しい NotificationEvent() オブジェクトです。

例
const n = new Notification("Hello");
const myNotificationEvent = new NotificationEvent(type, { notification: n });
仕様書 ブラウザーの互換性

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4