shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
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
- $elm*-HTMLElement
The HTMLElement on which to monitor
Return
- -(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
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space