ExtendableEvent.ExtendableEvent()

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译
您也可以阅读此文章的English (US)版。

The ExtendableEvent() constructor creates a new ExtendableEvent object.

Syntax

var myExtendableEvent = new ExtendableEvent(type, init);

Parameters

type
The type of the ExtendableEvent, for example install, activate.
init Optional
An options object containing any custom settings that you want to apply to the event object. Currently no possible options exist inside the spec, but this has been defined for forward compatibility across the different derived events.

Specifications

Specification Status Comment
Service Workers
The definition of 'ExtendableEvent' in that specification.
Working Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
ExtendableEvent() constructor
Experimental
Chrome Full support 40Edge Full support 17Firefox Full support 44
Notes
Full support 44
Notes
Notes Service workers (and Push) have been disabled in the Firefox 45 & 52 Extended Support Releases (ESR).
IE No support NoOpera Full support 24Safari No support NoWebView Android Full support 40Chrome Android Full support 40Firefox Android Full support 44Opera Android Full support 24Safari iOS No support NoSamsung Internet Android Full support 4.0

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.

See also

文档标签和贡献者

最后编辑者: jpmedley,