browser-interaction-time
browser-interaction-time copied to clipboard
fix: remove event listeners for throttled events
- When removing event listeners, refer to the new function created by
throttleinstead of the original unthrottled function - Pass in the document/window listener options to
removeEventListener. From https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener
Warning: If a listener is registered twice, one with the capture flag set and one without, you must remove each one separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.
- Don't try to go into idle mode if already idle
- Add
extraDocumentIdleEvents. I'm dispatching aCustomEventwhich I want to treat as the user is active
Hooray! All contributors have signed the CLA.