Class BeforeInstallPromptEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
CAUTION
Non-standardBeforeInstallPromptEvent is the interface of the Window.Beforeinstallprompt event fired at the Window object before a user is prompted to "install" a website to a home screen on mobile.
[Value("BeforeInstallPromptEvent")]
public class BeforeInstallPromptEvent : Event
- Inheritance
-
BeforeInstallPromptEvent
- Inherited Members
Remarks
This interface inherits from the Event interface.
-Making PWAs installable
-How to provide your own in-app install experience on web.dev (2021)
Constructors
BeforeInstallPromptEvent()
public BeforeInstallPromptEvent()
BeforeInstallPromptEvent(string, EventInit)
CAUTION
Non-standardBeforeInstallPromptEvent() constructor creates a new BeforeInstallPromptEvent object.
public BeforeInstallPromptEvent(string type, EventInit eventInitDict = null)
Parameters
Remarks
-Making PWAs installable
-How to provide your own in-app install experience on web.dev (2021)
Methods
Prompt()
CAUTION
Non-standardprompt() method of the BeforeInstallPromptEvent interface allows a developer to show theinstall prompt at a time of their own choosing. Typically this will be called in the event handler for the app's custom install UI.
[Value("prompt")]
public Task<PromptResponseObject> Prompt()
Returns
- Task<PromptResponseObject>
A Promise resolving to an object containing the following properties:
Remarks
This method must be called in the event handler for a user action (such as a button click) and may only be called once on a given BeforeInstallPromptEvent instance.
-Making PWAs installable
-How to provide your own in-app install experience on web.dev (2021)