Class: CBroadcastChannel

codemelted.CBroadcastChannel(name, onMessage)

Wrapper object for the Broadcast Channel API. Constructed via the codemelted_network.broadcastChannel and provides the bindings for working with the channel.

Constructor

new CBroadcastChannel(name, onMessage)

Constructor for the class.
Parameters:
Name Type Description
name string The url that
onMessage COnMessageListener The receiver for messages.
Source:

Methods

close() → {void}

Closes the channel.
Source:
Returns:
Type
void

postMessage(data) → {void}

Broadcasts a message via the channel
Parameters:
Name Type Description
data any The data to communicate.
Source:
Returns:
Type
void