Listen for DOM node insertion, see detect-node-insertion
npm i dom-inserted
var domInserted = require('dom-inserted');
// Listen for elements that have a .inserted class
domInserted.listen();
// Listen for elements that have a .custom class
domInserted.listen('custom')
document.addEventListener('inserted', onInserted, false);
function onInserted(ev){
// ev.detail contains: {animationName: ..., insertedElement: ...}
var evDetail = ev.detail;
}
You will need to have node setup on your machine.
Then you can install dependencies and build:
npm i && npm run build
That will output the built distributables to ./build
.
MIT, see LICENSE.md for details.