BeforeInstallPromptEvent: platforms property
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
The platforms
property of the BeforeInstallPromptEvent
interface lists the platforms on which the event was dispatched. This is provided for user agents that want to present a choice of versions to the user such as, for example, "web" or "play" which would allow the user to choose between a web version or an Android version.
Value
An array of strings, in which each string identifies a target platform for the installation.
Browser compatibility
BCD tables only load in the browser
See also
- Making PWAs installable
- How to provide your own in-app install experience on web.dev (2021)