MessageEvent
MessageEvent(type, options)
Event carrying a structured-clone message payload.
Parameters
| Name | Type | Description |
|---|---|---|
type | string | |
optionsoptional | Object |
MessageEvent(type, options)
Event carrying a structured-clone message payload.
| Name | Type | Description |
|---|---|---|
type | string | |
optionsoptional | Object |
data: *
Structured-clone payload carried by a message event.
direction: string = ""
Direction of a JSplitter Worker message: panel-to-worker or worker-to-panel. Manually constructed MessageEvent objects use an empty string unless a direction is supplied explicitly.
errorMessage: string = ""
JSplitter reconstruction diagnostic for a messageerror event. It contains the structured-clone read failure reported by the receiving endpoint and is an empty string for an ordinary message event.
lastEventId: string = ""
Last event identifier. JSplitter Worker messages do not use event-stream IDs, so this is an empty string.
origin: string = ""
Message origin. JSplitter Worker messages use an empty string because they are not URL-origin messages.
ports: Array = []
Transferred message ports. JSplitter does not expose MessagePort objects, so this array is empty.
source: * = null
Message source endpoint. JSplitter Worker messages do not expose a MessagePort-style source, so this is null.