Enable lifecycle events for HTML elements:
$ npm install lifecycle-events
var lifecycleEvents = ;//enable lifecycle events for all elements on the pagelifecycleEvents;;;//Disable all lifecycle eventslifecycleEvents;//Enable lifecycle events for a Node/NodeListlifecycleEvents;element;element;//Disable lifecycle events for the previously added element/selectorlifecycleEvents;
To make it work in IE and old browsers, you may need to polyfill
Enable lifecycle events for an Element, NodeList or selector. If no selector specified,
'*' is used. An optional container element/selector may be specified in speed purpose.
Disable lifecycle events for previously registered selector. If no selector specified, all lifecycle events are unbound.
Callback name used for attaching lifecycle event.
attached is used by default. Synomim:
Callback name used for detaching lifecycle event.
detached is used by default.Synomim:
Also see viewport-events for