InstallEvent.InstallEvent()

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The InstallEvent() constructor creates a new InstallEvent object.

Syntax

var myInstallEvent = new InstallEvent(type, init);

Parameters

type
The type of the event.
init Optional
An options object containing any custom settings that you want to apply to the event object. Available options are as follows:
  • activeWorker: The ServiceWorker that is currently actively controlling the page.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
InstallEvent() constructor
Experimental
Chrome Full support 40Edge Full support ≤79Firefox Full support 44
Notes
Full support 44
Notes
Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.
IE No support NoOpera Full support 27Safari No support NoWebView Android Full support 40Chrome Android Full support 40Firefox Android Full support 44Opera Android Full support 27Safari 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