Skip to content

API Reference / @gtkx/testing / queryController

Variable: queryController

const queryController: <T>(widget, controllerType) => T | null

Defined in: packages/testing/dist/user-event/controller.d.ts:19

Returns the first controller of the given type attached to a widget.

Type Parameters

T

T extends Gtk.EventController

Parameters

widget

Gtk.Widget

The widget whose controllers are inspected.

controllerType

ControllerConstructor<T>

The controller class to match.

Returns

T | null

The first matching controller, or null when the widget has none.

Released under the MPL-2.0 License.