BlockSuite API Documentation / @blocksuite/sync / BroadcastChannelAwarenessSource
Class: BroadcastChannelAwarenessSource
Defined in: awareness/impl/broadcast.ts:15
Implements
Constructors
new BroadcastChannelAwarenessSource()
new BroadcastChannelAwarenessSource(
channelName
):BroadcastChannelAwarenessSource
Defined in: awareness/impl/broadcast.ts:36
Parameters
channelName
string
Returns
BroadcastChannelAwarenessSource
Properties
awareness
awareness:
null
|Awareness
=null
Defined in: awareness/impl/broadcast.ts:16
channel
channel:
null
|BroadcastChannel
=null
Defined in: awareness/impl/broadcast.ts:18
channelName
readonly
channelName:string
Defined in: awareness/impl/broadcast.ts:36
Methods
connect()
connect(
awareness
):void
Defined in: awareness/impl/broadcast.ts:38
Parameters
awareness
Awareness
Returns
void
Implementation of
disconnect()
disconnect():
void
Defined in: awareness/impl/broadcast.ts:53
Returns
void
Implementation of
handleAwarenessUpdate()
handleAwarenessUpdate(
changes
,origin
):void
Defined in: awareness/impl/broadcast.ts:20
Parameters
changes
AwarenessChanges
origin
unknown
Returns
void
handleChannelMessage()
handleChannelMessage(
event
):void
Defined in: awareness/impl/broadcast.ts:59
Parameters
event
MessageEvent
<ChannelMessage
>
Returns
void