Enables or disables a list of triggers defined on the given element.

IMPORTANT: When constructed, it disables all given triggers as a form of initialization.


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

  • Action name: "enable".
  • Accepted string arguments: one or more unique IDs of triggers defined on the given element
<button id="btn">Enable/disable</button>
<button data-lisn-on-click="
@enable=triggerA,triggerB +target=#btn
@add-class=clsA +id=triggerA
"
data-lisn-on-click="@add-class=clsB +id=triggerB"
></button>

Implements

Methods

Constructors

Properties

Methods

Constructors

Properties

do: () => Promise<void>

Enables the triggers with IDs given to the constructor.

toggle: () => Promise<void>

Toggles the enabled state on each trigger given to the constructor.

undo: () => Promise<void>

Disables the triggers with IDs given to the constructor.