ExtendableEvent Class

An event whose lifetime can be extended by promises (https://w3c.github.io/ServiceWorker/#extendableevent-interface): the lifecycle events (install, activate) and the functional events of the service workers.

public class ExtendableEvent : Event
Inheritance
Event ExtendableEvent

Constructors

NameDescription
ExtendableEvent(string, ExtendableEventInit?)Creates an extendable event.

ExtendableEvent(string, ExtendableEventInit?)

ExtendableEvents.cs

Creates an extendable event.

public ExtendableEvent(string type, ExtendableEventInit? eventInitDict = null)

Methods

NameDescription
WaitUntil(Task<object?>)Extends the lifetime of the event until the promise settles (https://w3c.github.io/ServiceWorker/#dom-extendableevent-waituntil).

WaitUntil(Task<object?>)

ExtendableEvents.cs

Extends the lifetime of the event until the promise settles (https://w3c.github.io/ServiceWorker/#dom-extendableevent-waituntil).

public void WaitUntil(Task<object?> f)

Parameters

f Task<object?>

Exceptions

DomException
An InvalidStateError when the event is not trusted or not active.

See also