No, it will not work; it will be queued and then interrupted. The specification goes through several steps when you call setTimeout
, one of which (after the minimum timeout, plus a user agent with missed timeouts, etc.) ultimately:
- Queue to task task.
This seems to be happening regardless of whether the handle that was returned in step 10 was cleared, i.e. the call setTimeout
will always cause something to be in the queue.
When you call clearTimeout
it :
should clear the entry identified as a descriptor from the list of active timers
.. , setTimeout
. , , , :
- , :
, , , .