This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Draft
This page is not complete.
The NotificationEvent()
constructor creates a new NotificationEvent
object.
var myNotificationEvent = new NotificationEvent(type, NotificationEventInit);
Notification
object to be used as the notification the event is dispatched on. In later drafts of the specification, this parameter is not optional.var n = new Notification('Hello'); var init = { notification: n }; var myNotificationEvent = new NotificationEvent(type, init);
Specification | Status | Comment |
---|---|---|
Notifications API The definition of 'NotificationEvent()' in that specification. | Living Standard | Living standard. |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 42 | 44.0 (44.0)[1] | ? | 29 | ? |
Available in workers | 45 | ? | ? | 32 | ? |
Secure contexts only | 62 | ? | ? | 39 | ? |
Feature | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support | No support | 42 | 44.0 (44.0) | (Yes) | ? | 29 | ? |
Available in workers | No support | 45 | ? | ? | ? | 32 | ? |
Secure contexts only | No support | 62 | ? | ? | ? | 39 | ? |
[1] Service workers (and Push) have been disabled in the Firefox 45 and 52 Extended Support Releases (ESR.)
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/NotificationEvent/NotificationEvent