content icon indicating copy to clipboard operation
content copied to clipboard

promise: see also AbortController

Open fowl2 opened this issue 9 months ago • 3 comments

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 avatar May 01 '24 08:05 fowl2

Preview URLs

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

github-actions[bot] avatar May 01 '24 08:05 github-actions[bot]

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

skyclouds2001 avatar May 01 '24 17:05 skyclouds2001

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

fowl2 avatar May 02 '24 01:05 fowl2