A RetroSearch Logo

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

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/NotificationEvent/NotificationEvent below:

NotificationEvent: NotificationEvent() constructor - Web APIs

NotificationEvent: NotificationEvent() constructor

Baseline 2023

Newly available

Note: This feature is only available in Service Workers.

The NotificationEvent() constructor creates a new NotificationEvent object.

Syntax
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 "".

Return value

A new NotificationEvent() object.

Examples
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