web api constructor
BeforeInstallPromptEvent: BeforeInstallPromptEvent() constructor
Limited availability
The BeforeInstallPromptEvent() constructor creates a new BeforeInstallPromptEvent object.
Syntax
new BeforeInstallPromptEvent(type)
new BeforeInstallPromptEvent(type, eventInitDict)
Parameters
type- : A string with the name of the event, set to
beforeinstallprompt.
- : A string with the name of the event, set to
eventInitDictOptional- : An object with a single optional property
platforms, which is an array of strings, listing the platforms on which the event will be dispatched.
- : An object with a single optional property
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
- Making PWAs installable
- How to provide your own in-app install experience on web.dev (2021)