Detect when an element is changed in DOM
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.travis.yml
index.js
license
package-lock.json
package.json
readme.md
screenshot.png

readme.md

element-change

Detect when an element is changed in DOM

Install

$ npm install --save element-change

Usage

const elementChange = require('element-change');

elementChange('#feed',onChangeCallback)

API

elementChanged(selector)

selector

Type: string

CSS selector.

Waits until element is ready in the DOM using element-ready

onChangeCallback()

Type: Function

onChangeCallback() will be called with MutationRecord parameter.

Example

screenshot

Inspiration

License

MIT © Ashik Nesin