Initialise elements when inserted into the DOM using MutationObserver.
npm install mutation-initialiserMutationInitialiserThis provides a wrapper aroundMutationObserver
to initialise elements on a page as they are inserted into the document.
Alternatives are:
* To simply receive a promise for when an element is loaded into the document,
consider elementLoaded().
* To simply handle an event for an element that does not exist yet, consider using
event delegation.
* For more complicated cases, use MutationObserver directly.
* For building custom elements,
consider Web Components.
API documentation is missing whilst this is under development. Feel free to browse the examples.