Implement AbortSignal.throwIfAborted
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: annevk, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
Convenience method for web developers writing signal-accepting operations.
Discussion: https://github.com/whatwg/dom/issues/927
Standard change: https://github.com/whatwg/dom/pull/1034
Tests: https://github.com/web-platform-tests/wpt/pull/31947
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Comment 3•3 years ago
|
||
bugherder |
Comment 4•3 years ago
|
||
FF97 docs work for this can be tracked in https://github.com/mdn/content/issues/11593
This is mostly just browser compatibility update and a page for this method: https://github.com/mdn/content/pull/11804
For the page I just used the simple async polling example from the spec (which checks the signal and throws on each iteration of a loop before executing the function again).
Are there any other cases where this might be useful? Is calling this method how a developer might "generically" implement an abort in their own APIs that take a signal?
Reporter | ||
Comment 5•3 years ago
|
||
Hey Hamish, yeah, that's correct. There's two examples in the specification to that effect:
Comment 6•3 years ago
|
||
Thanks very much @annevk. I've tried to capture that in https://github.com/mdn/content/pull/11907.
Description
•