BroadcastChannel class
The interface represents a named channel that any browsing
context of a given origin can subscribe to. It allows
communication between different documents (in different windows,
tabs, frames or iframes) of the same origin. Messages are
broadcasted via a message
event fired at all objects listening
to the channel.
Note: This feature is available in Web Workers
EventTarget
BroadcastChannel
- Implemented types
- Available extensions
- Annotations
-
- @experimental
- @JS()
- @staticInterop
Constructors
- BroadcastChannel(String name)
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Available on BroadcastChannel, provided by the PropsBroadcastChannel extension
no setter -
onmessage
↔ EventHandlerNonNull<
Event> ? -
Available on BroadcastChannel, provided by the PropsBroadcastChannel extension
getter/setter pair -
onmessageerror
↔ EventHandlerNonNull<
Event> ? -
Available on BroadcastChannel, provided by the PropsBroadcastChannel extension
getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
close(
) → void -
Available on BroadcastChannel, provided by the PropsBroadcastChannel extension
-
dispatchEvent(
Event event) → bool -
Available on EventTarget, provided by the PropsEventTarget extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postMessage(
dynamic message) → void -
Available on BroadcastChannel, provided by the PropsBroadcastChannel extension
-
removeEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited