草案
此页面不完整。
NotificationEvent()
构造函数创建新
NotificationEvent
对象。
var myNotificationEvent = new NotificationEvent(type, NotificationEventInit);
type
TBD
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);
| 规范 | 状态 | 注释 |
|---|---|---|
|
Notifications API
The definition of 'NotificationEvent() constructor' in that specification. |
实时标准 | Living standard. |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
NotificationEvent()
构造函数
|
Chrome 42 | Edge ≤18 |
Firefox
44
|
IE ? | Opera 37 | Safari ? | WebView Android No | Chrome Android 42 | Firefox Android 44 | Opera Android 37 | Safari iOS ? | Samsung Internet Android 4.0 |
完整支持
不支持
兼容性未知
实验。期望将来行为有所改变。
见实现注意事项。
NotificationEvent
NotificationEvent()