### Hierarchy

- EventTarget
  - MessagePort

## Index

### Properties

- EventTarget
- onmessage
- onmessageerror

### Methods

- addEventListener
- close
- dispatchEvent
- postMessage
- removeEventListener
- start

## Properties

### EventTarget

EventTarget: object

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5081

#### Type declaration

- ##### constructor: function

  - new __type(): EventTarget
  - - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5082

    #### Returns EventTarget

- ##### prototype: EventTarget

### onmessage

onmessage: function | null

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:10075

### onmessageerror

onmessageerror: function | null

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:10076

## Methods

### addEventListener

- addEventListener<K>(type: K, listener: function, options?: boolean | AddEventListenerOptions): void
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void

- Overrides EventTarget.addEventListener

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:10093

  #### Type parameters

  - #### K: keyof MessagePortEventMap

  #### Parameters

  - ##### type: K

  - ##### listener: function

    - - (this: MessagePort, ev: MessagePortEventMap[K]): any

      - #### Parameters

        - ##### this: MessagePort

        - ##### ev: MessagePortEventMap[K]

        #### Returns any

  - ##### Optional options: boolean | AddEventListenerOptions

  #### Returns void

- Overrides EventTarget.addEventListener

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:10094

  #### Parameters

  - ##### type: string

  - ##### listener: EventListenerOrEventListenerObject

  - ##### Optional options: boolean | AddEventListenerOptions

  #### Returns void

### close

- close(): void

- - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:10080

  Disconnects the port, so that it is no longer active.

  #### Returns void

### dispatchEvent

- dispatchEvent(event: Event): boolean

- Inherited from EventTarget.dispatchEvent

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5074

  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

  - ##### event: Event

  #### Returns boolean

### postMessage

- postMessage(message: any, transfer?: Transferable[]): void

- - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:10088

  Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side. Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.

  #### Parameters

  - ##### message: any

  - ##### Optional transfer: Transferable[]

  #### Returns void

### removeEventListener

- removeEventListener<K>(type: K, listener: function, options?: boolean | EventListenerOptions): void
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void

- Overrides EventTarget.removeEventListener

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:10095

  #### Type parameters

  - #### K: keyof MessagePortEventMap

  #### Parameters

  - ##### type: K

  - ##### listener: function

    - - (this: MessagePort, ev: MessagePortEventMap[K]): any

      - #### Parameters

        - ##### this: MessagePort

        - ##### ev: MessagePortEventMap[K]

        #### Returns any

  - ##### Optional options: boolean | EventListenerOptions

  #### Returns void

- Overrides EventTarget.removeEventListener

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:10096

  #### Parameters

  - ##### type: string

  - ##### listener: EventListenerOrEventListenerObject

  - ##### Optional options: boolean | EventListenerOptions

  #### Returns void

### start

- start(): void

- - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:10092

  Begins dispatching messages received on the port.

  #### Returns void

Generated using TypeDoc