browser-interaction-time
browser-interaction-time copied to clipboard
BrowserInteractionTime.startTimer on a destroyed instance does not poll for time changes
I was attempting to reuse a BrowserInteractionTime
instance to trigger event listeners after an absolute amount of time, but allow for clearing the callbacks once another event type happened.
After calling destroy
on my instance, I found that the instance never started polling again, and no further callbacks could be triggered from the instance.
This is because this. checkCallbackIntervalId
is not cleared in destroy
, but it is checked in startTimer
, so a new interval is never set.