Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2023年3月.
* Some parts of this feature may have varying levels of support.
メモ: この機能はサービスワーカー内でのみ利用可能です。
NotificationEvent は通知 APIのインターフェイスで、サービスワーカー (ServiceWorker) の ServiceWorkerGlobalScope で配信される通知イベントを表します。
このインターフェイスは ExtendableEvent インターフェイスを継承しています。
メモ: ServiceWorkerGlobalScope オブジェクトで発行される持続的な通知イベントのみが、NotificationEventインターフェイスを実装します。Notification オブジェクトで発行される非持続的な通知イベントは、Eventインターフェイスを実装します。
新しい NotificationEvent オブジェクトを作成します。
親インターフェイスである ExtendableEvent から継承したプロパティもあります。
NotificationEvent.notification 読取専用イベントを発生させるためにクリックされた通知を表す Notification オブジェクトを返します。
NotificationEvent.action 読取専用ユーザーがクリックした通知ボタンの文字列 ID を返します。ユーザーがアクションボタン以外の場所で通知をクリックした場合、または通知にボタンがない場合、この値は空の文字列を返します。
親インターフェイスである ExtendableEvent から継承したメソッドもあります。
| Notifications API # notificationevent |
メモ: このインターフェイスは通知 API で定義されていますが、ServiceWorkerGlobalScope を通してアクセスします。
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年7月22日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.