Viewport enter and exit monitoring for elements.
npm install @odopod/odo-viewport --save
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');
}
});
Visit the Odo component directory for demos, code examples, and documentation.