1.2.2 • Published 7 years ago
screentimer v1.2.2
Screentimer
An ES6 class, jQuery-free version of robflaherty/screentime.
Usage
import Screentimer from 'screentimer';
const element = document.querySelector('#my-element');
// Setup
const timer = new Screentimer(element, count => {
console.log(`Seen #my-element on-screen for ${count} intervals since the last report.`);
});
// Optional event handler cleanup
timer.destroy();