Liking cljdoc? Tell your friends :D

web.BroadcastChannel

The BroadcastChannel interface represents a named channel that browsing context of a given origin can subscribe to. It allows between different documents (in different windows, tabs, frames iframes) of the same origin. Messages are broadcasted via a message fired at all BroadcastChannel objects listening to the channel.

The BroadcastChannel interface represents a named channel that
browsing context of a given origin can subscribe to. It allows
between different documents (in different windows, tabs, frames
iframes) of the same origin. Messages are broadcasted via a message
fired at all BroadcastChannel objects listening to the channel.
raw docstring

closecljs

(close this)

Method.

The BroadcastChannel.close() terminates the connection to the channel, allowing the object to be garbage collected. This is necessary step to perform as there is no other way for a browser know that this channel is not needed anymore.

var str = channel.close();

See also: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/close

Method.

The BroadcastChannel.close() terminates the connection to the
channel, allowing the object to be garbage collected. This is
necessary step to perform as there is no other way for a browser
know that this channel is not needed anymore.

`var str = channel.close();`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/close`
sourceraw docstring

constructorcljs

Constructor.

The BroadcastChannel() constructor creates a new web.BroadcastChannel and connects it to the underlying channel.

See also: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/BroadcastChannel

Constructor.

The BroadcastChannel() constructor creates a new `web.BroadcastChannel` and connects it to the underlying channel.

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/BroadcastChannel`
sourceraw docstring

namecljs

(name this)

Property.

The read-only BroadcastChannel.name property returns a dom.DOMString, uniquely identifies the given channel with its name. This name passed to the web.BroadcastChannel() constructor at creation and is therefore read-only.

var str = channel.name;

See also: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/name

Property.

The read-only BroadcastChannel.name property returns a `dom.DOMString`,
uniquely identifies the given channel with its name. This name
passed to the `web.BroadcastChannel()` constructor at creation
and is therefore read-only.

`var str = channel.name;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/name`
sourceraw docstring

onmessagecljs

(onmessage this)

Property.

The BroadcastChannel.onmessage event handler is a property that the function to execute when a message event, of type web.MessageEvent, received by this web.BroadcastChannel. Such an event is sent the browser with a message broadcasted to the channel.

channel.onmessage = function;

See also: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessage

Property.

The BroadcastChannel.onmessage event handler is a property that
the function to execute when a message event, of type `web.MessageEvent`,
received by this `web.BroadcastChannel`. Such an event is sent
the browser with a message broadcasted to the channel.

`channel.onmessage = function;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessage`
sourceraw docstring

onmessageerrorcljs

(onmessageerror this)

Property.

The onmessageerror event handler of the web.BroadcastChannel is an web.EventListener, called whenever an web.MessageEvent type messageerror is fired on the BroadcastChannel instance — is, when it receives a message that cannot be deserialized.

bc.onmessageerror = function() { ... };

See also: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessageerror

Property.

The onmessageerror event handler of the `web.BroadcastChannel`
is an `web.EventListener`, called whenever an `web.MessageEvent`
type messageerror is fired on the BroadcastChannel instance —
is, when it receives a message that cannot be deserialized.

`bc.onmessageerror = function() { ... };`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessageerror`
sourceraw docstring

post-messagecljs

(post-message this object)

Method.

The BroadcastChannel.postMessage() sends a message, which can of any kind of web.Object, to each listener in any browsing with the same origin. The message is transmitted as a message targeted at each BroadcastChannel bound to the channel.

var str = channel.postMessage(object);

See also: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/postMessage

Method.

The BroadcastChannel.postMessage() sends a message, which can
of any kind of `web.Object`, to each listener in any browsing
with the same origin. The message is transmitted as a message
targeted at each BroadcastChannel bound to the channel.

`var str = channel.postMessage(object);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/postMessage`
sourceraw docstring

set-onmessage!cljs

(set-onmessage! this val)

Property.

The BroadcastChannel.onmessage event handler is a property that the function to execute when a message event, of type web.MessageEvent, received by this web.BroadcastChannel. Such an event is sent the browser with a message broadcasted to the channel.

channel.onmessage = function;

See also: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessage

Property.

The BroadcastChannel.onmessage event handler is a property that
the function to execute when a message event, of type `web.MessageEvent`,
received by this `web.BroadcastChannel`. Such an event is sent
the browser with a message broadcasted to the channel.

`channel.onmessage = function;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessage`
sourceraw docstring

set-onmessageerror!cljs

(set-onmessageerror! this val)

Property.

The onmessageerror event handler of the web.BroadcastChannel is an web.EventListener, called whenever an web.MessageEvent type messageerror is fired on the BroadcastChannel instance — is, when it receives a message that cannot be deserialized.

bc.onmessageerror = function() { ... };

See also: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessageerror

Property.

The onmessageerror event handler of the `web.BroadcastChannel`
is an `web.EventListener`, called whenever an `web.MessageEvent`
type messageerror is fired on the BroadcastChannel instance —
is, when it receives a message that cannot be deserialized.

`bc.onmessageerror = function() { ... };`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessageerror`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close