Invoke a callback when a DOM element is inserted.
$ component install component/inserted
var inserted = require('inserted');
inserted(el, function(){
console.log('element was inserted!');
});
Invokes fn
when el
is inserted from the DOM.
The setInterval
fallback uses inserted.interval
, defaulting to 200ms.
MIT