Baseline 2023
Newly available
Note: This feature is only available in Service Workers.
The NotificationEvent()
constructor creates a new NotificationEvent
object.
new NotificationEvent(type, options)
Parameters
type
A string with the name of the event. It is case-sensitive and browsers set it to notificationclick
or notificationclose
.
options
An object that, in addition of the properties defined in ExtendableEvent()
, can have the following properties:
notification
A Notification
object to be used as the notification the event is dispatched on.
action
Optional
An action associated with the notification. It defaults to ""
.
A new NotificationEvent()
object.
const n = new Notification("Hello");
const myNotificationEvent = new NotificationEvent(type, { notification: n });
Specifications Browser compatibility
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