0.0.3 • Published 7 years ago
html-element-watch v0.0.3
HTMLElementWatch
check changes in HTML elements and execute an trigger
How to use
import { HTMLElementWatch } from 'html-element-watch'
const selector = document.querySelector('body > .container')
const watcher = new HTMLElementWatch(selector)
watcher.on('ADDED', target => console.log('added', target))
watcher.on('ADDED', target => console.log('removed', target))
watcher.start() // start monitor
watcher.stop() // stop monitor