Skip to content

ElectronIncomingMessage.once method

ElectronIncomingMessage › once

Unofficial

Registers a one-time listener for the given response event.

Signature:

once(event: "aborted", listener: (...args: unknown[]) => void): this

Parameters:

ParameterTypeDescription
event"aborted"The event name.
listener(...args: unknown[]) => voidThe event handler.

Returns: thisThis IncomingMessage instance.


Unofficial

Signature:

once(event: "data", listener: (chunk: Buffer) => void): this

Parameters:

ParameterTypeDescription
event"data"
listener(chunk: Buffer) => void

Returns: this


Unofficial

Signature:

once(event: "end", listener: (...args: unknown[]) => void): this

Parameters:

ParameterTypeDescription
event"end"
listener(...args: unknown[]) => void

Returns: this


Unofficial

Signature:

once(event: "error", listener: (...args: unknown[]) => void): this

Parameters:

ParameterTypeDescription
event"error"
listener(...args: unknown[]) => void

Returns: this