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
eventInitDict- : 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
Browser compatibility
See also
- Making PWAs installable
- How to provide your own in-app install experience on web.dev (2021)
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
