whenAnimationEnd

Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.when

Detect when animation ends

Params

  1. $elm*-HTMLElement

    The element to listen on

Return

  1. -Promise<HTMLElement>

    A promise that will be resolved once the animation has ended

Example

import { whenAnimationEnd } from '@blackbyte/sugar/dom'
whenAnimationEnd(myCoolElm).then(($elm) => {
  // do something...
});

Todo

  • testsnormal