content
content copied to clipboard
Add prose and meta-docs for [LegacyNullToEmptyString]
Description
This PR adds relevant information to existing MDN pages about properties or method parameters prefixed with the WebIDL [LegacyNullToEmptyString].
Motivation
This is part of openwebdocs/project#159 where we want to uniformize and add more information stored in WebIDLs files. Standardizing them makes them easier to understand and MDN Web docs articles more precise.
Additional details
What does this extended attribute mean?
This extended attribute alters how null values are converted to a string. The standard way is to convert null to the string "null". When this extended attribute is present, the null object is converted to an empty string ("").
What does this PR do?
- It adds to all relevant properties a sentence explaining the set behaviour when set to the
nullvalue, with a tiny inline example. - It adds to all such parameters a sentence explaining what the behaviour is when
nullis passed. - Update the meta-docs, listing the standardized sentences.
Related issues and pull requests
None.
Preview URLs (21 pages)
/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file/en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/API_property_subpage_template/en-US/docs/Web/API/CSSStyleDeclaration/cssFloat/en-US/docs/Web/API/CSSStyleDeclaration/setProperty/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern/en-US/docs/Web/API/CharacterData/data/en-US/docs/Web/API/DOMImplementation/createDocument/en-US/docs/Web/API/Document/alinkColor/en-US/docs/Web/API/Document/bgColor/en-US/docs/Web/API/Document/linkColor/en-US/docs/Web/API/Document/vlinkColor/en-US/docs/Web/API/Element/innerHTML/en-US/docs/Web/API/Element/outerHTML/en-US/docs/Web/API/HTMLFontElement/color/en-US/docs/Web/API/HTMLImageElement/border/en-US/docs/Web/API/HTMLTableElement/bgColor/en-US/docs/Web/API/HTMLTableElement/cellPadding/en-US/docs/Web/API/HTMLTableElement/cellSpacing/en-US/docs/Web/API/MediaList/mediaText/en-US/docs/Web/API/ShadowRoot/innerHTML/en-US/docs/Web/API/Window/open
Flaws (1)
Note! 20 documents with no flaws that don't need to be listed. 🎉
URL: /en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/API_property_subpage_template
Title: API property subpage template
Flaw count: 1
- broken_links:
Can't resolve /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file#type_of_the_property
(comment last updated: 2024-07-12 01:42:10)
All looks good to me! Agree with @wbamberg suggestions and one nit :)
@teoli2003 , are you coming back to this, or should we close it for now?
Hi @teoli2003 shall we close this for now?
Hi @teoli2003 shall we close this for now?
I have fixed all open points and rebased. Let's ask for a re-review.
This pull request has merge conflicts that must be resolved before it can be merged.
I'm open to merging this if no other feedback is given before end of week.
Going to merge now. Thanks everyone!