-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOM: AbortController and AbortSignal #5960
Conversation
*This report has been truncated because the total content is 2960787 characters in length, which is in excess of GitHub.com's limit for comments (65536 characters). Firefox (nightly)Testing web-platform-tests at revision 60b79dd All results7 tests ran/XMLHttpRequest/interfaces.html
/dom/abort/event.any.worker.html
/dom/abort/event.any.html
/dom/interface-objects.html
/dom/interfaces.html
|
Sauce (safari)Testing web-platform-tests at revision 60b79dd All results7 tests ran/XMLHttpRequest/interfaces.html
/dom/abort/event.any.worker.html
/dom/abort/event.any.html
/dom/interface-objects.html
/dom/interfaces.html
/fullscreen/interfaces.html
/html/dom/interfaces.html
|
*This report has been truncated because the total content is 3024452 characters in length, which is in excess of GitHub.com's limit for comments (65536 characters). Sauce (MicrosoftEdge)Testing web-platform-tests at revision 60b79dd All results7 tests ran/XMLHttpRequest/interfaces.html
/dom/abort/event.any.worker.html
/dom/abort/event.any.html
/dom/interface-objects.html
/dom/interfaces.html
|
*This report has been truncated because the total content is 3000408 characters in length, which is in excess of GitHub.com's limit for comments (65536 characters). Chrome (unstable)Testing web-platform-tests at revision 60b79dd All results7 tests ran/XMLHttpRequest/interfaces.html
/dom/abort/event.any.worker.html
/dom/abort/event.any.html
/dom/interface-objects.html
/dom/interfaces.html
|
dom/abort/event.any.js
Outdated
@@ -0,0 +1,22 @@ | |||
async_test(t => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be a sync test (and it's good to test that things happen synchronously)
dom/abort/event.any.js
Outdated
assert_false(s.aborted); | ||
|
||
s.addEventListener("abort", | ||
t.step_func_done(e => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will done() the test twice, once via the step_func_done and once via t.done() below
dom/abort/event.any.js
Outdated
t.done(); | ||
}, "AbortController() basics"); | ||
|
||
done(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another good test (optional) would be that aborting twice does not fire the event twice.
I guess this is ready but @annevk should merge together with the spec change when he gets back. |
I kinda want to know from @domenic and @jakearchibald what the MVP is. Mozilla would also need the Fetch part to be defined in order to ship something, though potentially just Streams could work. |
I think cancelling a fetch needs to be part of the MVP. Passing the signal through to the service worker could come later (but conscious we've left people waiting a long time here). |
New APIs for a generic reusable abort mechanism. Both Fetch and Streams will build on this initially. Tests: web-platform-tests/wpt#5960. Fixes part of whatwg#438. (This commit is also authored by Jake and Anne.)
New APIs for a generic reusable abort mechanism. Both Fetch and Streams will build new features on this. Tests: web-platform-tests/wpt#5960. Fixes part of #438. (This commit is also authored by Jake and Anne.)
For whatwg/dom#437.