dom-mutation-notifier
Friendly interface for MutationObserver.
Eight events are implemented: (element|attribute|text|comment)(Added|Removed)
The constructor takes the same arguments as the observe
method of MutationObserver
.
If no options are provided, childList
will be watched by default.
MutationNotifier will only start observing when a valid event listener is added (with on
). It will stop observing if all listeners have been removed (with off
).
Usage
var MutationNotifier = var notifier = documentvar {}var {}notifier// Observing startsnotifiernotifiernotifier// Observing ends
License
dom-mutation-notifier is released under the MIT License. Copyright (c) 2017 Braveg1rl