Skip to content

API Reference / @gtkx/runtime / onceSignal

Function: onceSignal()

onceSignal(instance, signal, handler, after?): void

Defined in: runtime/dist/listeners.d.ts:25

Connects a handler that runs at most once, disconnecting itself after the first emission.

Parameters

instance

SignalConnectable

The object emitting the signal.

signal

string

The signal name to connect to.

handler

SignalHandler

The callback invoked on the first emission.

after?

boolean

When true, run the handler after the default handler.

Returns

void

Released under the MPL-2.0 License.