-
Notifications
You must be signed in to change notification settings - Fork 295
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
Add AbortSignal.aborted() static #960
Conversation
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 looks great, thanks for working on this James!
@josepharhar @smaug---- @mfreed7 @rniwa thoughts on adding this? Seems simple enough and there's precedent with promises (Promise.reject()
). Though maybe that means this should be AbortSignal.abort()
?
0559b7a
to
089887c
Compare
Proposed new API addition. Refs: whatwg/dom#960
PR to add test here: web-platform-tests/wpt#28003 |
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.
Thanks, this looks good to me. Mozilla would be fine with adding this.
Returns an already aborted AbortSignal
089887c
to
7ed2987
Compare
lgtm, this looks particularly easy to implement :) |
@jasnell thanks! You or your employer will need to sign https://participate.whatwg.org/agreement to appease the IPR bot. It seems we're all done here apart from that. @benjamingr @jakearchibald @domenic @MattiasBuelens any final thoughts? |
Done! |
LGTM. I still vaguely prefer the |
This generally looks fine to me and makes sense, though bike-shedding, I'm not sure I like the name. |
rsLGTM based on @josepharhar's LGTM. Thanks! |
@jasnell do you want to file the bug against Firefox? |
Yeah I'll do so this morning! |
I ended up filing https://bugzilla.mozilla.org/show_bug.cgi?id=1698468. Thanks everyone for the quick turnaround! Hopefully it'll get implemented in a similar pace. 😊 |
Thanks @annevk ... Sorry I had missed my reminder notification to do that! I appreciate it! |
Refs: whatwg/dom#960 PR-URL: #37693 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #37693 Refs: whatwg/dom#960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Refs: whatwg/dom#960 PR-URL: #37693 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #37693 Refs: whatwg/dom#960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Refs: whatwg/dom#960 PR-URL: #37693 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #37693 Refs: whatwg/dom#960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Does this need an "impacts documentation" label? |
cc @whatwg/documentation |
I’ll make time to write up MDN documentation for this some time this month (unless somebody gets to it before I manage to) |
PR-URL: nodejs#37798 Refs: whatwg/dom#960 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
https://bugs.webkit.org/show_bug.cgi?id=223071 <rdar://problem/75575483> Reviewed by Darin Adler. LayoutTests/imported/w3c: Resync WPT test from upstream a8cbe9c to gain test coverage. * web-platform-tests/dom/abort/event.any-expected.txt: * web-platform-tests/dom/abort/event.any.js: * web-platform-tests/dom/abort/event.any.worker-expected.txt: Source/WebCore: Implement AbortSignal.abort() which creates and returns an already aborted AbortSignal: - whatwg/dom#960 - web-platform-tests/wpt#28003 No new tests, covered by updated test. * dom/AbortSignal.cpp: (WebCore::AbortSignal::createAborted): (WebCore::AbortSignal::AbortSignal): * dom/AbortSignal.h: * dom/AbortSignal.idl: Canonical link: https://commits.webkit.org/235582@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PR-URL: #37798 Refs: whatwg/dom#960 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
https://bugs.webkit.org/show_bug.cgi?id=223071 <rdar://problem/75575483> Reviewed by Darin Adler. LayoutTests/imported/w3c: Resync WPT test from upstream a8cbe9c712ad032d36 to gain test coverage. * web-platform-tests/dom/abort/event.any-expected.txt: * web-platform-tests/dom/abort/event.any.js: * web-platform-tests/dom/abort/event.any.worker-expected.txt: Source/WebCore: Implement AbortSignal.abort() which creates and returns an already aborted AbortSignal: - whatwg/dom#960 - web-platform-tests/wpt#28003 No new tests, covered by updated test. * dom/AbortSignal.cpp: (WebCore::AbortSignal::createAborted): (WebCore::AbortSignal::AbortSignal): * dom/AbortSignal.h: * dom/AbortSignal.idl: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@274773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refs: whatwg/dom#960 PR-URL: nodejs#37693 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#37693 Refs: whatwg/dom#960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Refs: whatwg/dom#960 PR-URL: nodejs#37693 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#37693 Refs: whatwg/dom#960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Refs: whatwg/dom#960 PR-URL: nodejs#37693 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#37693 Refs: whatwg/dom#960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Refs: whatwg/dom#960 PR-URL: #37693 Backport-PR-URL: #38386 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #37693 Backport-PR-URL: #38386 Refs: whatwg/dom#960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Returns an already aborted AbortSignal per #959
Fixes: #959
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff