browser-interaction-time icon indicating copy to clipboard operation
browser-interaction-time copied to clipboard

BrowserInteractionTime.startTimer on a destroyed instance does not poll for time changes

Open alechoey opened this issue 3 years ago • 0 comments

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.

alechoey avatar Nov 20 '21 06:11 alechoey