API Reference › Globals › ServiceWorkerMessageEvent
# Interface: ServiceWorkerMessageEvent
# Hierarchy
-
↳ ServiceWorkerMessageEvent
# Index
# Properties
- AT_TARGET
- BUBBLING_PHASE
- CAPTURING_PHASE
- Event
- NONE
- bubbles
- cancelBubble
- cancelable
- composed
- currentTarget
- data
- defaultPrevented
- eventPhase
- isTrusted
- lastEventId
- origin
- ports
- returnValue
- source
- srcElement
- target
- timeStamp
- type
# Methods
# Properties
# AT_TARGET
• AT_TARGET: number
Inherited from ServiceWorkerMessageEvent.AT_TARGET
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5445
# BUBBLING_PHASE
• BUBBLING_PHASE: number
Inherited from ServiceWorkerMessageEvent.BUBBLING_PHASE
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5446
# CAPTURING_PHASE
• CAPTURING_PHASE: number
Inherited from ServiceWorkerMessageEvent.CAPTURING_PHASE
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5447
# Event
• Event: object
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5451
# Type declaration:
new __type(
type
: string,eventInitDict?
: EventInit): EventAT_TARGET: number
BUBBLING_PHASE: number
CAPTURING_PHASE: number
NONE: number
prototype: Event
# NONE
• NONE: number
Inherited from ServiceWorkerMessageEvent.NONE
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5448
# bubbles
• bubbles: boolean
Inherited from ServiceWorkerMessageEvent.bubbles
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5387
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.
# cancelBubble
• cancelBubble: boolean
Inherited from ServiceWorkerMessageEvent.cancelBubble
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5388
# cancelable
• cancelable: boolean
Inherited from ServiceWorkerMessageEvent.cancelable
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5392
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.
# composed
• composed: boolean
Inherited from ServiceWorkerMessageEvent.composed
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5396
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.
# currentTarget
• currentTarget: EventTarget | null
Inherited from ServiceWorkerMessageEvent.currentTarget
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5400
Returns the object whose event listener's callback is currently being invoked.
# data
• data: any
Defined in packages/workers/src/service-worker.d.ts:6
# defaultPrevented
• defaultPrevented: boolean
Inherited from ServiceWorkerMessageEvent.defaultPrevented
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5404
Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.
# eventPhase
• eventPhase: number
Inherited from ServiceWorkerMessageEvent.eventPhase
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5408
Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.
# isTrusted
• isTrusted: boolean
Inherited from ServiceWorkerMessageEvent.isTrusted
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5412
Returns true if event was dispatched by the user agent, and false otherwise.
# lastEventId
• lastEventId: string
Defined in packages/workers/src/service-worker.d.ts:7
# origin
• origin: string
Defined in packages/workers/src/service-worker.d.ts:8
# ports
• ports: ReadonlyArray‹MessagePort› | null
Defined in packages/workers/src/service-worker.d.ts:9
# returnValue
• returnValue: boolean
Inherited from ServiceWorkerMessageEvent.returnValue
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5413
# source
• source: ServiceWorker | MessagePort | null
Defined in packages/workers/src/service-worker.d.ts:10
# srcElement
• srcElement: EventTarget | null
Inherited from ServiceWorkerMessageEvent.srcElement
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5415
deprecated
# target
• target: EventTarget | null
Inherited from ServiceWorkerMessageEvent.target
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5419
Returns the object to which event is dispatched (its target).
# timeStamp
• timeStamp: number
Inherited from ServiceWorkerMessageEvent.timeStamp
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5423
Returns the event's timestamp as the number of milliseconds measured relative to the time origin.
# type
• type: string
Inherited from ServiceWorkerMessageEvent.type
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5427
Returns the type of event, e.g. "click", "hashchange", or "submit".
# Methods
# composedPath
▸ composedPath(): EventTarget[]
Inherited from ServiceWorkerMessageEvent.composedPath
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5431
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: EventTarget[]
# initEvent
▸ initEvent(type
: string, bubbles?
: boolean, cancelable?
: boolean): void
Inherited from ServiceWorkerMessageEvent.initEvent
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5432
Parameters:
Name | Type |
---|---|
type | string |
bubbles? | boolean |
cancelable? | boolean |
Returns: void
# preventDefault
▸ preventDefault(): void
Inherited from ServiceWorkerMessageEvent.preventDefault
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5436
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: void
# stopImmediatePropagation
▸ stopImmediatePropagation(): void
Inherited from ServiceWorkerMessageEvent.stopImmediatePropagation
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5440
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: void
# stopPropagation
▸ stopPropagation(): void
Inherited from ServiceWorkerMessageEvent.stopPropagation
Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5444
When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
Returns: void