Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

EventTarget

EventTarget: object

Type declaration

  • constructor: function
    • Returns EventTarget

  • prototype: EventTarget

name

name: string

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

onmessage

onmessage: function | null

onmessageerror

onmessageerror: function | null

Methods

addEventListener

close

  • close(): void
  • Closes the BroadcastChannel object, opening it up to garbage collection.

    Returns void

dispatchEvent

  • dispatchEvent(event: Event): boolean
  • 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.

    Parameters

    Returns boolean

postMessage

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

    Parameters

    • message: any

    Returns void

removeEventListener

Generated using TypeDoc