Interface BroadcastChannel

Hierarchy

Properties

name: string

Returns the channel name (as passed to the constructor).

MDN Reference

onmessage: ((this, ev) => any)

Type declaration

onmessageerror: ((this, ev) => any)

Type declaration

Methods

  • Closes the BroadcastChannel object, opening it up to garbage collection.

    MDN Reference

    Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.

    MDN Reference

    Parameters

    • message: any

    Returns void