Displays or "undisplays" (display: none) the given element.

IMPORTANT: When constructed, it adds display: none to the element as a form of initialization.


To use with auto-widgets (HTML API) as part of a trigger specification:

  • Action name: "display".
  • Accepted string arguments: none
  • Accepted options: none
<button id="btn">Display/undisplay</button>
<div data-lisn-on-click="@display +target=#btn"></div>

Implements

Methods

Constructors

Properties

Methods

Constructors

Properties

do: () => Promise<void>

It reverts the element to its original display property.

toggle: () => Promise<void>

Displays the element if it's "undisplayed", otherwise "undisplays" it.

undo: () => Promise<void>

Sets display: none on the element.