Table of Contents

Class BeforeInstallPromptEvent

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
CAUTION
Non-standard
The BeforeInstallPromptEvent 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)

See also on MDN

Constructors

BeforeInstallPromptEvent()

public BeforeInstallPromptEvent()

BeforeInstallPromptEvent(string, EventInit)

CAUTION
Non-standard
The BeforeInstallPromptEvent() constructor creates a new BeforeInstallPromptEvent object.
public BeforeInstallPromptEvent(string type, EventInit eventInitDict = null)

Parameters

type string
eventInitDict EventInit

Remarks

Methods

Prompt()

CAUTION
Non-standard
The prompt() method of the BeforeInstallPromptEvent interface allows a developer to show the
install 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)

See also on MDN