Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brunocarvalhodearaujo/html-element-watch

check changes in HTML elements and execute an trigger
https://github.com/brunocarvalhodearaujo/html-element-watch

element html trigger watch

Last synced: 9 days ago
JSON representation

check changes in HTML elements and execute an trigger

Awesome Lists containing this project

README

        

HTMLElementWatch
================

check changes in HTML elements and execute an trigger

## How to use

```````js

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
```````