In some cases, we can found ourselves doing lots of intensive, CPU hungry tasks while the users are interacting with our end products or applicatio...
For further actions, you may consider blocking this person and/or reporting abuse
I've used this API to detect if a blur event on an input was due to tabbing and prevent showing an invalidation message if the input was left in an invalid state since tabbing back will give it back it's focus.
That’s a great example and use case of the API. Thanks a lot for the reply John.
Thanks for this article. I would like to propose a little fix.
Try to do next:
Example with Polling
on the page.poller
callsconsole.log
twice as often.poller
. It will work even afterpoller.stop()
call.This is due to double call of the
poller.start
. For the first time from your sample code. The second time you call it from theonVisibilityChange
. There was nopoller.stop
method call between doublepoller.start
method call in this case.You can avoid it by calling the
poller.stop
method before thepoller.start
in theonVisibilityChange
.Nice article !