Skip to content

API Reference / @gtkx/testing / prettyWidget

Variable: prettyWidget

const prettyWidget: (container, options?) => string

Defined in: pretty-widget.d.ts:24

Renders a widget tree as an indented, HTML-like string showing each widget's tag, accessible attributes, and text content.

Parameters

container

Container

The scope whose widget tree is formatted.

options?

PrettyWidgetOptions

Formatting options such as truncation length and highlighting.

Returns

string

The formatted representation of the tree.

Released under the MPL-2.0 License.