Skip to content

AshikNesin/element-change

Repository files navigation

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