API Reference
    Preparing search index...

    Class BroadcastChannelDriver

    BroadcastChannel-based signaling driver for intra-origin communication.

    This driver is useful for testing and debugging purposes, but is not suitable for production use due to its limitations (e.g. same-origin restriction).

    const driver = new BroadcastChannelDriver('my-channel');
    

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Publish a signaling message to a namespace.

      Parameters

      • namespace: string[]

        Target namespace segments.

      • data: any

        Signaling payload to deliver.

      Returns void

    • Unsubscribe a previously registered namespace handler.

      Parameters

      • namespace: string[]

        Namespace segments used for message routing.

      • handler: (data: any) => void

        Handler reference originally passed to on.

      Returns void

    • Subscribe to signaling messages in a namespace.

      Parameters

      • namespace: string[]

        Namespace segments used for message routing.

      • handler: (data: any) => void

        Callback invoked with message payload.

      Returns void