Skip to content

Conversation

marcindz88
Copy link
Contributor

Description

The AbortController examples include code that reused the same AbortController instance across multiple fetch calls, which causes them to be instantly cancelled.

Motivation

The documentation should be updated to help developers understand that an AbortController instance cannot be reused.

@marcindz88 marcindz88 requested a review from a team as a code owner September 6, 2025 14:13
@marcindz88 marcindz88 requested review from wbamberg and removed request for a team September 6, 2025 14:13
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Sep 6, 2025
Copy link
Contributor

github-actions bot commented Sep 7, 2025

Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

Thank you for the fix, @marcindz88 ! The code looks good to me but the description needs tweaking a bit, especially the paragraph starting "We first create a controller...", because we don't, any more :).

@marcindz88
Copy link
Contributor Author

@wbamberg Do you think we could leave the example on the AbortController page and include only a link in the methods and constructor to not repeat this or is is a common practice here to include it on all pages for easier accessibility ?

@wbamberg
Copy link
Collaborator

@wbamberg Do you think we could leave the example on the AbortController page and include only a link in the methods and constructor to not repeat this

Yes, I think this is a good idea. I'm not really a fan of this style where we duplicate examples, it's such a maintenance burden.

@marcindz88 marcindz88 requested a review from wbamberg September 10, 2025 17:15
Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

👍 thanks for the fix @marcindz88 !

@wbamberg wbamberg merged commit a4fd602 into mdn:main Sep 17, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants