Header menu logo fable-electron-docs-api

IpcMainServiceWorker Type

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

Instance members

Instance member Description

this.handle (channel, listener)

Full Usage: this.handle (channel, listener)

Parameters:
Modifiers: inline
channel : string
listener : IpcMainServiceWorkerInvokeEvent * obj[] -> U2<Promise<obj>, obj>

this.handleOnce (channel, listener)

Full Usage: this.handleOnce (channel, listener)

Parameters:
Modifiers: inline

Handles a single invokeable IPC message, then removes the listener. See ipcMainServiceWorker.handle(channel, listener).

channel : string
listener : IpcMainServiceWorkerInvokeEvent * obj[] -> U2<Promise<obj>, obj>

this.on (channel, listener)

Full Usage: this.on (channel, listener)

Parameters:
Modifiers: inline

Listens to channel, when a new message arrives listener would be called with listener(event, args...).

channel : string
listener : IpcMainServiceWorkerEvent * obj[] -> unit

this.once (channel, listener)

Full Usage: this.once (channel, listener)

Parameters:
Modifiers: inline

Adds a one time listener function for the event. This listener is invoked only the next time a message is sent to channel, after which it is removed.

channel : string
listener : IpcMainServiceWorkerEvent * obj[] -> unit

this.removeAllListeners ?channel

Full Usage: this.removeAllListeners ?channel

Parameters:
    ?channel : string

Modifiers: inline

Removes listeners of the specified channel.

?channel : string

this.removeHandler channel

Full Usage: this.removeHandler channel

Parameters:
    channel : string

Modifiers: inline

Removes any handler for channel, if present.

channel : string

this.removeListener (channel, listener)

Full Usage: this.removeListener (channel, listener)

Parameters:
    channel : string
    listener : obj[] -> unit

Modifiers: inline

Removes the specified listener from the listener array for the specified channel.

channel : string
listener : obj[] -> unit

Type something to start searching.