MessageEvent
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:1347
A message received by a target object.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MessageEvent(
type,initializer):MessageEvent
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:1348
Parameters
Section titled “Parameters”string
initializer
Section titled “initializer”Returns
Section titled “Returns”MessageEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”bubbles
Section titled “bubbles”
readonlybubbles:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:685
Returns true or false depending on how event was initialized. True if event goes through its target’s ancestors in reverse tree order, and false otherwise.
Inherited from
Section titled “Inherited from”cancelable
Section titled “cancelable”
readonlycancelable:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:691
Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.
Inherited from
Section titled “Inherited from”cancelBubble
Section titled “cancelBubble”cancelBubble:
boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:739
Inherited from
Section titled “Inherited from”composed
Section titled “composed”
readonlycomposed:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:679
Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.
Inherited from
Section titled “Inherited from”currentTarget?
Section titled “currentTarget?”
readonlyoptionalcurrentTarget:EventTarget<Record<string,Event>>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:709
Returns the object whose event listener’s callback is currently being invoked.
Inherited from
Section titled “Inherited from”
readonlydata:any
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:1354
Returns the data of the message.
defaultPrevented
Section titled “defaultPrevented”
readonlydefaultPrevented:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:697
Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.
Inherited from
Section titled “Inherited from”eventPhase
Section titled “eventPhase”
readonlyeventPhase:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:673
Returns the event’s phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.
Inherited from
Section titled “Inherited from”isTrusted
Section titled “isTrusted”
readonlyisTrusted:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:733
Returns true if event was dispatched by the user agent, and false otherwise.
Inherited from
Section titled “Inherited from”lastEventId
Section titled “lastEventId”
readonlylastEventId:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:1366
Returns the last event ID string, for server-sent events.
origin
Section titled “origin”
readonlyorigin:null|string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:1360
Returns the origin of the message, for server-sent events and cross-document messaging.
readonlyports:MessagePort[]
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:1378
Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.
returnValue
Section titled “returnValue”
readonlyreturnValue:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:703
Inherited from
Section titled “Inherited from”source
Section titled “source”
readonlysource:null|MessagePort
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:1372
Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.
srcElement
Section titled “srcElement”
readonlysrcElement:null|EventTarget<Record<string,Event>>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:721
Inherited from
Section titled “Inherited from”target?
Section titled “target?”
readonlyoptionaltarget:EventTarget<Record<string,Event>>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:715
Returns the object to which event is dispatched (its target).
Inherited from
Section titled “Inherited from”timeStamp
Section titled “timeStamp”
readonlytimeStamp:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:727
Returns the event’s timestamp as the number of milliseconds measured relative to the time origin.
Inherited from
Section titled “Inherited from”
readonlytype:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:667
Returns the type of event, e.g. “click”, “hashchange”, or “submit”.
Inherited from
Section titled “Inherited from”AT_TARGET
Section titled “AT_TARGET”
readonlystaticAT_TARGET:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:766
Inherited from
Section titled “Inherited from”BUBBLING_PHASE
Section titled “BUBBLING_PHASE”
readonlystaticBUBBLING_PHASE:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:767
Inherited from
Section titled “Inherited from”CAPTURING_PHASE
Section titled “CAPTURING_PHASE”
readonlystaticCAPTURING_PHASE:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:765
Inherited from
Section titled “Inherited from”
readonlystaticNONE:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:764
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”composedPath()
Section titled “composedPath()”composedPath():
EventTarget<Record<string,Event>>[]
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:763
Returns the invocation target objects of event’s path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root’s mode is “closed” that are not reachable from event’s currentTarget.
Returns
Section titled “Returns”EventTarget<Record<string, Event>>[]
Inherited from
Section titled “Inherited from”preventDefault()
Section titled “preventDefault()”preventDefault():
void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:751
If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”stopImmediatePropagation()
Section titled “stopImmediatePropagation()”stopImmediatePropagation():
void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:745
Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Event.stopImmediatePropagation
stopPropagation()
Section titled “stopPropagation()”stopPropagation():
void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:757
When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
Returns
Section titled “Returns”void
