Timer should count time, it is not specific to to any threads. So if main thread has some long running JS, xhr timeout should fire.
The spec has:
Run these steps in parallel:
Wait until either req’s done flag is set or
the timeout attribute value number of milliseconds has passed since these steps started
while timeout attribute value is not zero.
If req’s done flag is unset, then set the timed out flag and terminate fetching.
Bug 1663590 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Timer should count time, it is not specific to to any threads. So if main thread has some long running JS, xhr timeout should fire.
The spec has:
Run these steps in parallel:
Wait until either req’s done flag is set or
the timeout attribute value number of milliseconds has passed since these steps started
while timeout attribute value is not zero.
If req’s done flag is unset, then set the timed out flag and terminate fetching.
https://xhr.spec.whatwg.org/#dom-xmlhttprequest-send