Skip to content

API Reference / @gtkx/testing / getSuggestedQuery

Variable: getSuggestedQuery

const getSuggestedQuery: (widget, variant?, method?) => Suggestion | undefined

Defined in: suggestions.d.ts:21

Computes the recommended query for reaching the given widget, preferring role, then label text, placeholder text, text, display value, and name.

Parameters

widget

Gtk.Widget

Widget to build a suggestion for.

variant?

Variant

Query variant the suggestion should use.

method?

Method

Restrict the suggestion to a specific query family instead of choosing by priority.

Returns

Suggestion | undefined

The best available suggestion, or undefined when no query applies.

Released under the MPL-2.0 License.