Skip to content
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

promise: see also AbortController #33346

Merged
merged 3 commits into from
Jun 9, 2024
Merged

promise: see also AbortController #33346

merged 3 commits into from
Jun 9, 2024

Conversation

fowl2
Copy link
Contributor

@fowl2 fowl2 commented May 1, 2024

Description

Add a link to AbortController in See Also.

Motivation

I couldn't remember how to cancel a promise in JavaScript, and I looked here but there wasn't any mention of "cancel".

@fowl2 fowl2 requested a review from a team as a code owner May 1, 2024 08:06
@fowl2 fowl2 requested review from Josh-Cena and removed request for a team May 1, 2024 08:06
@github-actions github-actions bot added Content:JS JavaScript docs size/xs 0-5 LoC changed labels May 1, 2024
Copy link
Contributor

github-actions bot commented May 1, 2024

Preview URLs

(comment last updated: 2024-06-09 19:29:21)

@skyclouds2001
Copy link
Contributor

I think AbortController has no relationship with Promise. AbortController(and AbortSignal) can be used in some APIs to cancel some operation in Web API, but it can't be used to cancel a Promise

@fowl2
Copy link
Contributor Author

fowl2 commented May 2, 2024

The relationship is 'I have a async operation/Promise I want to cancel/be cancellable, where do I look next?'. see also: #33347

Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this, but do you think it would be helpful to add the same text in #33347 here, in the promise reference too?

Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Josh-Cena Josh-Cena merged commit 79d0563 into mdn:main Jun 9, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs size/xs 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants