Header menu logo fable-electron-docs-api

MessagePortMain Type

⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ❌

Instance members

Instance member Description

this.close ()

Full Usage: this.close ()

Modifiers: inline

Disconnects the port, so it is no longer active.

this.offClose handler

Full Usage: this.offClose handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when the remote end of a MessagePortMain object becomes disconnected.

handler : unit -> unit

this.offMessage handler

Full Usage: this.offMessage handler

Parameters:
Modifiers: inline

Emitted when a MessagePortMain object receives a message.

handler : MessageEvent -> unit

this.onClose handler

Full Usage: this.onClose handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when the remote end of a MessagePortMain object becomes disconnected.

handler : unit -> unit

this.onMessage handler

Full Usage: this.onMessage handler

Parameters:
Modifiers: inline

Emitted when a MessagePortMain object receives a message.

handler : MessageEvent -> unit

this.onceClose handler

Full Usage: this.onceClose handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when the remote end of a MessagePortMain object becomes disconnected.

handler : unit -> unit

this.onceMessage handler

Full Usage: this.onceMessage handler

Parameters:
Modifiers: inline

Emitted when a MessagePortMain object receives a message.

handler : MessageEvent -> unit

this.postMessage (message, ?transfer)

Full Usage: this.postMessage (message, ?transfer)

Parameters:
Modifiers: inline

Sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.

message : obj
?transfer : MessagePortMain[]

this.start ()

Full Usage: this.start ()

Modifiers: inline

Starts the sending of messages queued on the port. Messages will be queued until this method is called.

Type something to start searching.