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
This interface inherits from the ExtendableEvent interface.
Constructors
InstallEvent()
public InstallEvent()
InstallEvent(string, ExtendableEventInit)
public InstallEvent(string type, ExtendableEventInit eventInitDict = null)
Parameters
typestringeventInitDictExtendableEventInit
Remarks
Methods
AddRoutes(Union138)
NOTE
ExperimentaladdRoutes() 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
rulesUnion138
Returns
- Task<GlobalObject.Undefined>
A Promise that fulfills with
undefined.