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

URLSearchParams.prototype[@@iterator]() is missing #28640

Closed
fisker opened this issue Aug 18, 2023 · 7 comments
Closed

URLSearchParams.prototype[@@iterator]() is missing #28640

fisker opened this issue Aug 18, 2023 · 7 comments
Labels
closed: wontfix Out of scope, too much effort, or working as intended Content:WebAPI Web API docs

Comments

@fisker
Copy link

fisker commented Aug 18, 2023

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

Should add a page for it like Map.prototype[@@iterator]()

What did you expect to see?

Documentation for URLSearchParams.prototype[@@iterator]().

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

@fisker fisker added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Aug 18, 2023
@github-actions github-actions bot added Content:JS JavaScript docs Content:WebAPI Web API docs labels Aug 18, 2023
@Josh-Cena
Copy link
Member

Web APIs do not document well-known symbols because they are implementation details. The landing page already explicitly documents that it's iterable, so I think this is all good and follows our guidelines. We may make all of this more structured in the future; see openwebdocs/project#159

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 2023
@Josh-Cena Josh-Cena added closed: wontfix Out of scope, too much effort, or working as intended and removed Content:JS JavaScript docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Aug 18, 2023
@fisker
Copy link
Author

fisker commented Aug 18, 2023

Kind of miss leading that there is no @@iterator on left side under Instance methods. I thought it's not iterable...

@Josh-Cena
Copy link
Member

Web APIs in general tend to be more high-level and focus on the majority of use cases. For example, we may assume that an average developer neither knows what @@iterator means nor how an iterable object should be iterated, so spelling it out on the landing page is perhaps more pragmatic.

@fisker
Copy link
Author

fisker commented Aug 18, 2023

Good to know, I'll try to read the text instead of search for @@iterator next time. 😄

@fisker
Copy link
Author

fisker commented Aug 18, 2023

@Josh-Cena A off topic question.

Unlike @@iterator it's normally simple enough to explain with a code block, the up coming @@dispose may need a page to explain what have done for complex web stuff. Will we consider document it in future? (Since you said "Web APIs do not document well-known symbols")

@Josh-Cena
Copy link
Member

That's a good question! My feeling is that we don't usually worry about cleanup logic to start with, so maybe not. At most we would have an example saying "you should probably use using so it gets properly cleaned up". But I'm not a web API author and the decision is far from finalized, so don't take my word for it 😄

@fisker
Copy link
Author

fisker commented Aug 18, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: wontfix Out of scope, too much effort, or working as intended Content:WebAPI Web API docs
Projects
None yet
Development

No branches or pull requests

2 participants