Replies: 3 comments 3 replies
-
See: mdn/content#6891 JS docs document every single member; I don't think that's going to change and I'm happy with the current structure conventions, so let's just discuss about Web APIs here. Here's my personal suggestion:
...In other words, https://developer.mozilla.org/en-US/docs/Web/API/GPUSupportedFeatures is probably the closest to what I have in mind, except we shouldn't link to the JS methods but just link to the section on "set-like browser APIs" in the description. |
Beta Was this translation helpful? Give feedback.
-
Thanks for opening the conversation @Elchi3 ! I like 3. for maintenance costs - link to JS relevant documentation for each sub pages. Also agree with @Josh-Cena 's point above - that set-like should be mentioned in the description, except I do like the way https://developer.mozilla.org/en-US/docs/Web/API/GPUSupportedFeatures does it with methods listed. |
Beta Was this translation helpful? Give feedback.
-
I'm advocating for having separate pages for each of the built-in iterator types. The main reason is that they have conflicting compatibility tables and that is not at all clear on the single page. It could make organizing links to iterators more intuitive as a bonus. |
Beta Was this translation helpful? Give feedback.
-
In the API reference documentation, there seems to be no convention how iterable/maplike/setlike are documented. I'd like to agree on a consistent approach.
Interfaces can be declared iterable, maplike, or setlike (see https://webidl.spec.whatwg.org/#idl-iterable and further) which means they will have the
entries
,forEach
,keys
,values
, and[Symbol.iterator]
properties on their prototype (and more if they are [readonly] maplike or setlike).In BCD, whenever an interface is declared iterable/maplike/setlike, we add the relevant properties to the data. This gets done automatically using the @openwebdocs BCD collector most of the time anyways, so I think this is good as is. The only issue with the BCD entries is that we aren't sure which spec_urls to provide. We should fix that.
In mdn/content, there seem to be different approaches to how this gets documented and it would be good if we could make this consistent. There are at least these 5 different ways currently:
How would you prefer the interfaces document their iterable, maplike and setlike members?
Beta Was this translation helpful? Give feedback.
All reactions