MessageEventInit Class

https://html.spec.whatwg.org/multipage/comms.html#messageeventinit

public sealed class MessageEventInit : EventInit
Inheritance
EventInit MessageEventInit

Constructors

NameDescription
MessageEventInit()

MessageEventInit()

HtmlEvents.cs
public MessageEventInit()

No documentation is available.

Properties

NameDescription
DataGets the data of the message.
LastEventIdGets the last event ID of the event source that sent the message.
OriginGets the origin of the message sender.
PortsGets the message ports sent with the message.
SourceGets the object that sent the message, such as a window or a message port.

Gets the data of the message.

public object? Data { get; init; }

LastEventId

HtmlEvents.cs

Gets the last event ID of the event source that sent the message.

public string LastEventId { get; init; }

Gets the origin of the message sender.

public string Origin { get; init; }

Gets the message ports sent with the message.

public IReadOnlyList<MessagePort> Ports { get; init; }

Gets the object that sent the message, such as a window or a message port.

public EventTarget? Source { get; init; }