Skip to content

API Reference / @gtkx/testing / queryAllControllers

Function: queryAllControllers() ​

queryAllControllers<T>(target, controllerType): T[]

Defined in: packages/testing/src/user-event/controller.ts:14

Returns every controller of the given type attached to a widget, in the order GTK4 reports them.

Type Parameters ​

T ​

T extends EventController

Parameters ​

target ​

Accessible

The widget whose controllers are inspected.

controllerType ​

ControllerConstructor<T>

The controller class to match.

Returns ​

T[]

The matching controllers, or an empty array when the widget has none.