Constant that uniquely identifies this channel. Will be generated by the service, and guaranteed to be unique within the set of channels registered with the service.
In the case of system
channels (see SystemChannel), these IDs should persist across sessions. The
channel list is defined by the service, but can be overridden by a desktop owner. If the desktop owner keeps
this list static (which is recommended), then IDs will also persist across sessions.
How a client application should present this channel in any UI.
Event that is fired whenever a window broadcasts on this channel.
This can be triggered by a window belonging to the channel calling the top-level FDC3 broadcast
function, or by
any window calling this channel's broadcast method.
Function that should be called whenever a context is broadcast on this channel.
Event that is fired whenever a window joins this channel. This includes switching to/from the default channel.
The event also includes which channel the window was in previously. The channel
property within the
event will always be this channel instance.
The event type.
The handler to call when the event is fired.
Event that is fired whenever a window leaves this channel. This includes switching to/from the default channel.
The event also includes which channel the window is being added to. The previousChannel
property within the
event will always be this channel instance.
The event type.
The handler to call when the event is fired.
Broadcasts the given context on this channel.
Note that this function can be used without first joining the channel, allowing applications to broadcast on channels that they aren't a member of.
This broadcast will be received by all windows that are members of this channel, except for the window that
makes the broadcast. This matches the behavior of the top-level FDC3 broadcast
function.
The context to broadcast to all windows on this channel.
Returns the last context that was broadcast on this channel. All channels initially have no context, until a
window is added to the channel and then broadcasts. If there is not yet any context on the channel, this method
will return null
. The context is also reset back into its initial context-less state whenever a channel is
cleared of all windows.
The context of a channel will be captured regardless of how the context is broadcasted on this channel - whether
using the top-level FDC3 broadcast
function, or using the channel-level broadcast function on this
object.
NOTE: Only non-default channels are stateful, for the default channel this method will always return null
.
Returns a list of all windows belonging to the specified channel.
If the window making the call is a member of this channel, it will be included in the results. If there are no windows on this channel, an empty array is returned.
Adds the given window to this channel. If no identity is provided, the window making the call will be the window added to the channel.
If the channel has a current context (see getCurrentContext) then that context will be immediately passed to the given window upon joining the channel, via its context listener(s).
Note that all windows will always belong to exactly one channel at all times. If you wish to leave a channel,
the only way to do so is to join another channel. A window may rejoin the default channel by calling channels.defaultChannel.join()
.
The window that should be added to this channel. If omitted, will use the window that calls this method.
Unsubscribes from a particular event.
Has no effect if eventType
isn't a valid event, or handler
isn't a handler registered against eventType
.
The event being unsubscribed from.
The handler function to remove.
Unsubscribes from a particular event.
Has no effect if eventType
isn't a valid event, or handler
isn't a handler registered against eventType
.
The event being unsubscribed from.
The handler function to remove.
User-facing channels, to display within a color picker or channel selector component.
This list of channels should be considered fixed by applications - the service will own the list of user channels, making the same list of channels available to all applications, and this list will not change over the lifecycle of the service.
To fetch the list of available channels, use getSystemChannels.