screentimer

1.2.2 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i screentimer

Weekly Downloads

1

Version

1.2.2

License

MIT

Unpacked Size

19.2 kB

Total Files

11

Last publish

Collaborators

  • kohlmannj