Skip to content

Latest commit

 

History

History

odo-viewport

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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');
  }
});

Visit the Odo component directory for demos, code examples, and documentation.