`AbortSignal.timeout()` can't be used from chrome code without a window
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
People
(Reporter: lina, Unassigned)
References
(Blocks 1 open bug)
Details
Over in bug 1878420, we'd like to replace some hand-written helpers in the Sync code with AbortSignal.any()
and AbortSignal.timeout()
. The Sync code is chrome JS, and doesn't have a window.
Unfortunately, it looks like trying to call AbortSignal.timeout()
from a context where we don't have a window trips this check, and the method throws AbortSignal.timeout: Could not find window.
Would it be possible to make AbortSignal.timeout()
usable in contexts without a window?
Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 1•1 year ago
|
||
You've done work on AbortSignal Kagami, do you have an opinion?
AFAICT that part of code briefly copied what the global scope setTimeout
does. If there's any other setTimeout infra that works outside window, I don't see why we shouldn't use it there. In that case "what do we use in chrome context currently?" would be the question.
Hmm, we also have NS_NewTimer(). Maybe we can use that.
Description
•