NotificationEvent()

Draft: This page is not complete.

The NotificationEvent() constructor creates a new NotificationEvent object.

Syntax

var myNotificationEvent = new NotificationEvent(type, NotificationEventInit);

Parameters

type

TBD

NotificationEventInit Optional

A dictionary object containing a Notification object to be used as the notification the event is dispatched on. In later drafts of the specification, this parameter is not optional.

Example

var n = new Notification('Hello');
var init = { notification: n };
var myNotificationEvent = new NotificationEvent(type, init);

Specifications

Specification
Notifications API Standard (Notifications API)
# dom-notificationevent-notificationevent

Browser compatibility

BCD tables only load in the browser