MessageEvent<T> class
A message received by a target object.
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
-
MessageEvent(String type, [MessageEventInit<
T> ? eventInitDict]) -
factory
Properties
- atTarget → num
-
Available on Event, provided by the Event$Typings extension
no setter - bubbles → bool
-
Available on Event, provided by the Event$Typings extension
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.no setter - bubblingPhase → num
-
Available on Event, provided by the Event$Typings extension
no setter - cancelable → bool
-
Available on Event, provided by the Event$Typings extension
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.no setter - cancelBubble ↔ bool
-
Available on Event, provided by the Event$Typings extension
@deprecatedgetter/setter pair - capturingPhase → num
-
Available on Event, provided by the Event$Typings extension
no setter - composed → bool
-
Available on Event, provided by the Event$Typings extension
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.no setter -
composedPath
↔ List<
EventTarget> Function() -
Available on Event, provided by the Event$Typings extension
getter/setter pair - currentTarget → EventTarget?
-
Available on Event, provided by the Event$Typings extension
Returns the object whose event listener's callback is currently being invoked.no setter - data → T
-
Available on MessageEvent<
Returns the data of the message.T> , provided by the MessageEvent$Typings extensionno setter - defaultPrevented → bool
-
Available on Event, provided by the Event$Typings extension
Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.no setter - eventPhase → num
-
Available on Event, provided by the Event$Typings extension
Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- initEvent ↔ void Function(String, [bool?, bool?])
-
Available on Event, provided by the Event$Typings extension
getter/setter pair -
initMessageEvent
↔ void Function(String, [bool?, bool?, dynamic, String?, String?, Object?, List<
MessagePort> ?]) -
Available on MessageEvent<
T> , provided by the MessageEvent$Typings extensiongetter/setter pair - isTrusted → bool
-
Available on Event, provided by the Event$Typings extension
Returns true if event was dispatched by the user agent, and false otherwise.no setter - lastEventId → String
-
Available on MessageEvent<
Returns the last event ID string, for server-sent events.T> , provided by the MessageEvent$Typings extensionno setter - none → num
-
Available on Event, provided by the Event$Typings extension
no setter - origin → String
-
Available on MessageEvent<
Returns the origin of the message, for server-sent events and cross-document messaging.T> , provided by the MessageEvent$Typings extensionno setter -
ports
→ ReadonlyArray<
MessagePort> -
Available on MessageEvent<
Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.T> , provided by the MessageEvent$Typings extensionno setter - preventDefault ↔ void Function()
-
Available on Event, provided by the Event$Typings extension
getter/setter pair - returnValue ↔ bool
-
Available on Event, provided by the Event$Typings extension
@deprecatedgetter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → Object?
-
Available on MessageEvent<
Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.T> , provided by the MessageEvent$Typings extensionno setter - srcElement → EventTarget?
-
Available on Event, provided by the Event$Typings extension
no setter - stopImmediatePropagation ↔ void Function()
-
Available on Event, provided by the Event$Typings extension
getter/setter pair - stopPropagation ↔ void Function()
-
Available on Event, provided by the Event$Typings extension
getter/setter pair - target → EventTarget?
-
Available on Event, provided by the Event$Typings extension
Returns the object to which event is dispatched (its target).no setter - timeStamp → num
-
Available on Event, provided by the Event$Typings extension
Returns the event's timestamp as the number of milliseconds measured relative to the time origin.no setter - type → String
-
Available on Event, provided by the Event$Typings extension
Returns the type of event, e.g. "click", "hashchange", or "submit".no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited