Skip to content

API Reference / @gtkx/testing / createEvent

Variable: createEvent ​

const createEvent: (target, signalName, ...args) => WidgetEvent

Defined in: packages/testing/dist/fire-event.d.ts:23

Records a signal emission without delivering it, so it can be inspected or held and passed to fireEvent later.

Parameters ​

target ​

GObject.Object

The GObject instance the signal would be emitted on.

signalName ​

string

Name of the signal to emit.

args ​

...unknown[]

Arguments to pass to the signal handlers.

Returns ​

WidgetEvent

The recorded emission.

Released under the MPL-2.0 License.