ExtendableMessageEvent Class

The message event of a service worker (https://w3c.github.io/ServiceWorker/#extendablemessageevent).

public sealed class ExtendableMessageEvent : ExtendableEvent
Inheritance
ExtendableEvent ExtendableMessageEvent

Constructors

NameDescription
ExtendableMessageEvent(string, ExtendableMessageEventInit?)Creates a message event.

ExtendableMessageEvent(string, ExtendableMessageEventInit?)

ExtendableEvents.cs

Creates a message event.

public ExtendableMessageEvent(string type, ExtendableMessageEventInit? eventInitDict = null)

Properties

NameDescription
DataGets the data of the message.
LastEventIdGets the last event ID.
OriginGets the origin of the sender.
PortsGets the ports sent with the message.
SourceGets the sender: a Client, a ServiceWorker or a MessagePort, or null.

Gets the data of the message.

public object? Data { get; }

Gets the last event ID.

public string LastEventId { get; }

Gets the origin of the sender.

public string Origin { get; }

Gets the ports sent with the message.

public IReadOnlyList<MessagePort> Ports { get; }

Gets the sender: a Client, a ServiceWorker or a MessagePort, or null.

public object? Source { get; }