Add mutation observer to element, and broadcast mutations.
npm install be-vigilanthtml
...
`
Event my-event-name is fired from the div element when the direct children of the div element change.
If the value of the attribute isn't specified, the default event name is be-vigilant-changed:
`html
...
`
Use case II: be-vigilant also provides a brute-force way of sniffing out be-decorated adorned elements, even behind nooks and crannies of the DOM. be-decorated behaviors search for elements based on css observing, but sometimes those aren't always picked up.
For example:
`html
`
Using the standard ways be-decorated elements are registered via css animation queries, this template simply won't be registered.
be-vigilant will cause it to register, if instructed to do so:
`html
`
To fine tune how the mutation observer is configured:
`html
...
`
Another option, matchActions, provides the ability to specify different event names, based on css match tests on the mutated elements.
CDN
To use from a CDN:
`html
``