Table of Contents

Class InstallEvent

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The parameter passed into an ServiceWorkerGlobalScope.Install event handler function, the InstallEvent interface represents an install action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, it ensures that functional events such as FetchEvent are not dispatched during installation.

[Value("InstallEvent")]
public class InstallEvent : ExtendableEvent
Inheritance
InstallEvent
Inherited Members

Remarks

Constructors

InstallEvent()

public InstallEvent()

InstallEvent(string, ExtendableEventInit)

NOTE
Experimental
The InstallEvent() constructor creates a new InstallEvent object.
public InstallEvent(string type, ExtendableEventInit eventInitDict = null)

Parameters

type string
eventInitDict ExtendableEventInit

Remarks

Methods

AddRoutes(Union138)

NOTE
Experimental
The addRoutes() method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles.
[Value("addRoutes")]
public Task<GlobalObject.Undefined> AddRoutes(Union138 rules)

Parameters

rules Union138

Returns

Task<GlobalObject.Undefined>

A Promise that fulfills with undefined.

Remarks