You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on documenting the Highlight and HighlightRegistry interfaces on MDN right now (see mdn/content#23907).
Highlight is a Set-like object, and HighlightRegistry is a Map-like object. This means that, even if the spec doesn't mention it, they both have a size property, and many methods like set, add, clear, delete, etc. that need to be documented on MDN too.
A case could be made for MDN to handle this automatically. But I think it's better to actually write the entire doc again, rather than inherit from the Set and Map docs on MDN, because even if some objects are "like" Sets or Maps, it makes sense to document them in the context of their own parent API, with specific examples and so on.
So, I believe this scaffolding tool should generate the Set-like and Map-like members (methods and properties).
The text was updated successfully, but these errors were encountered:
@captainbrosset do you have example of pages that illustrate this pattern?
Generally speaking, I think we should discuss these patterns and their impact on page type templates in the mdn/content repo, and once the outcome becomes clear, then it can be reflected in the templates this tool uses.
(I've already starting making up patterns e.g. for overloaded operations based on what I've seen MDN pages do, but a more structured approach would deliver more useful results :)
The sidebar on this page shows the size property, and the add, clear, delete, entries, forEach, has, keys, and values methods which aren't spec'd on https://w3c.github.io/csswg-drafts/css-highlight-api-1/#highlight other than by saying that the Highlight interface is a setlike<AbstractRange>;
I am working on documenting the
Highlight
andHighlightRegistry
interfaces on MDN right now (see mdn/content#23907).Highlight
is a Set-like object, andHighlightRegistry
is a Map-like object. This means that, even if the spec doesn't mention it, they both have asize
property, and many methods likeset
,add
,clear
,delete
, etc. that need to be documented on MDN too.A case could be made for MDN to handle this automatically. But I think it's better to actually write the entire doc again, rather than inherit from the Set and Map docs on MDN, because even if some objects are "like" Sets or Maps, it makes sense to document them in the context of their own parent API, with specific examples and so on.
So, I believe this scaffolding tool should generate the Set-like and Map-like members (methods and properties).
The text was updated successfully, but these errors were encountered: