watchdom

1.0.5 • Public • Published

WatchDom

WatchDom is a MutationObserver chainable library dom observer.

Build Status

Install

npm

$ npm install watchdom

bower

$ bower install watchdom

Usage

Browser
var myElement = document.getElementById( "example" );

var params = {
  childList: true,
  attributes: true,
  characterData: true,
  subtree: true,
  attributeOldValue: true,
  characterDataOldValue: true
};

var watcher = domWatcher();
watcher.observe( myElement, params );
watcher.notify( function( mutation ) {
    // do something
} );

...

watcher.stop();

npm
import WatchDom from 'watchdom';

let watcher = WatchDom();
watcher.observe( myElement, params );
watcher.notify( ( mutation ) => {
    // do something
} );

...

watcher.stop();


Readme

Keywords

none

Package Sidebar

Install

npm i watchdom

Weekly Downloads

2

Version

1.0.5

License

MIT

Last publish

Collaborators

  • jotadeveloper