whenRemoved

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

Resolve a promise when the passed node has been removed from the dom

Params

  1. $elm*-HTMLElement

    The HTMLElement on which to monitor

Return

  1. -(Promise<HTMLElement>)

    The promise that will be resolved when the attribute exist on the element (and that it passes the checkFn)

Example

import { whenRemoved } from '@blackbyte/sugar/dom'
whenRemoved($myCoolHTMLElement).then(() => {
  // the element has been removed
});

Todo

  • testsnormal