StoredServiceWorker Class
An installed or activated service worker (https://w3c.github.io/ServiceWorker/#dfn-service-worker) stored by a ServiceWorkerBackend.
public sealed class StoredServiceWorkerConstructors
| Name | Description |
|---|---|
| StoredServiceWorker() |
StoredServiceWorker()
ServiceWorkerBackend.cs- Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public StoredServiceWorker()No documentation is available.
Properties
| Name | Description |
|---|---|
| ClassicScriptsImported | Gets whether the classic scripts imported flag is set (https://w3c.github.io/ServiceWorker/#dfn-classic-scripts-imported-flag). |
| EventTypesToHandle | Gets the types of the events the service worker handles (https://w3c.github.io/ServiceWorker/#dfn-set-of-event-types-to-handle), e.g. fetch. |
| Id | Gets the identifier of the service worker, unique in its registration. |
| RouterRules | Gets the rules registered by InstallEvent.addRoutes() (https://w3c.github.io/ServiceWorker/#dfn-list-of-router-rules), in order. |
| ScriptUrl | Gets the serialized URL of the script (https://w3c.github.io/ServiceWorker/#dfn-script-url). |
| Scripts | Gets the responses of the scripts of the service worker (https://w3c.github.io/ServiceWorker/#dfn-script-resource-map): its main script and the scripts it imports. |
| State | Gets whether the service worker was activated (activated) or only installed (installed). |
| Type | Gets the type of the script: classic or module. |
| UsedScriptUrls | Gets the URLs of the scripts imported by the service worker (https://w3c.github.io/ServiceWorker/#dfn-set-of-used-scripts). |
ClassicScriptsImported
ServiceWorkerBackend.csEventTypesToHandle
ServiceWorkerBackend.csGets the types of the events the service worker handles (https://w3c.github.io/ServiceWorker/#dfn-set-of-event-types-to-handle), e.g. fetch.
public IReadOnlyList<string> EventTypesToHandle { get; init; }Property value
RouterRules
ServiceWorkerBackend.csGets the rules registered by InstallEvent.addRoutes() (https://w3c.github.io/ServiceWorker/#dfn-list-of-router-rules), in order.
public IReadOnlyList<StoredServiceWorkerRouterRule> RouterRules { get; init; }Property value
ScriptUrl
ServiceWorkerBackend.csScripts
ServiceWorkerBackend.csGets the responses of the scripts of the service worker (https://w3c.github.io/ServiceWorker/#dfn-script-resource-map): its main script and the scripts it imports.
public IReadOnlyList<StoredServiceWorkerScript> Scripts { get; init; }Property value
UsedScriptUrls
ServiceWorkerBackend.csGets the URLs of the scripts imported by the service worker (https://w3c.github.io/ServiceWorker/#dfn-set-of-used-scripts).
public IReadOnlyList<string> UsedScriptUrls { get; init; }