mutation-initialiser
v0.1.6
Published
Initialise elements when inserted into the DOM using MutationObserver.
Downloads
22
Maintainers
Readme
MutationInitialiser
This provides a wrapper around
MutationObserver
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
MutationObserverdirectly. - For building custom elements, consider Web Components.
API documentation is missing whilst this is under development. Feel free to browse the examples.
