Class AnimatePause

Pauses or resumes all animations on the given element.

It works with CSS or Web Animations.

IMPORTANT: When constructed, it plays the animations as a form of initialization.


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

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

Implements

Methods

Constructors

Properties

Methods

Constructors

Properties

do: () => Promise<void>

Pauses the animations without resetting them.

toggle: () => Promise<void>

Resumes the animations if paused, otherwise pauses them.

undo: () => Promise<void>

Resumes the animations without resetting them.