• Subscribe to broadcasts for a specific topic. The returned function can be called to unsubscribe the function.

    NOTE: Use with contextbridge.broadcast().

    Type Parameters

    • T extends SubscribeCallback

    Parameters

    • topic: string
    • handler: T

    Returns (() => void)

      • (): void
      • Returns void