@odopod/odo-viewport
v1.1.1
Published
Viewport enter and exit monitoring for elements.
Downloads
38
Readme
Odo Viewport
Viewport enter and exit monitoring for elements.
Install
npm install @odopod/odo-viewport --save
Quick Start
import OdoViewport from '@odopod/odo-viewport';
OdoViewport.add({
element: document.getElementById('demo-enter-exit'),
enter: function () {
this.setAttribute('in-view', true);
},
exit: function () {
this.removeAttribute('in-view');
}
});
Documentation
Visit the Odo component directory for demos, code examples, and documentation.