SVGStyleElement docs
This adds missing docs for SVGStyleElement including examples and the docs for SVGStyleElement.media, SVGStyleElement.sheet and SVGStyleElement.title properties. It is part of the tidy I am doing for https://github.com/mdn/content/issues/18775
Note that most of the properties are not readonly. FF allows them to be written, and if valid values are uses, respects them. Chrome, at least in some case allows you to set the values, but does NOT respect them even if valid - at least for media.
While the fact that are not read-only means that the intent is that they are set, in some cases there are APIs I have run into where they allow values to be set but it is not meaningful to do so. So I am querying that. Upshot, might do a post process of this if https://github.com/w3c/svgwg/issues/891 confirms the intent (i.e. that chrome is off spec).
When this goes in I will need to update BCD to provide links to the new docs.
Preview URLs
- https://pr19172.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/SVGStyleElement/disabled
- https://pr19172.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/SVGStyleElement/media
- https://pr19172.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/SVGStyleElement/sheet
- https://pr19172.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/SVGStyleElement/title
- https://pr19172.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/SVGStyleElement/type
- https://pr19172.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/SVGStyleElement
- https://pr19172.content.dev.mdn.mozit.cloud/en-US/docs/Web/SVG/Element/style
Flaws
Note! 5 documents with no flaws that don't need to be listed. 🎉
URL: /en-US/docs/Web/API/SVGStyleElement
Title: SVGStyleElement
on GitHub
Flaw count: 3
-
macros:
-
Unknown macro document.queryselector -
Unknown macro document.getelementbyid
-
-
broken_links:
-
Link points to the page it's already on
-
URL: /en-US/docs/Web/API/SVGStyleElement/sheet
Title: SVGStyleElement.sheet
on GitHub
Flaw count: 1
-
macros:
-
/en-US/docs/Web/API/HTMLStyleElement/sheet does not exist
-
External URLs
URL: /en-US/docs/Web/SVG/Element/style
Title: <style>
on GitHub
No new external URLs
URL: /en-US/docs/Web/API/SVGStyleElement
Title: SVGStyleElement
on GitHub
No new external URLs
URL: /en-US/docs/Web/API/SVGStyleElement/media
Title: SVGStyleElement.media
on GitHub
No new external URLs
URL: /en-US/docs/Web/API/SVGStyleElement/sheet
Title: SVGStyleElement.sheet
on GitHub
No new external URLs
URL: /en-US/docs/Web/API/SVGStyleElement/type
Title: SVGStyleElement.type
on GitHub
No new external URLs
URL: /en-US/docs/Web/API/SVGStyleElement/disabled
Title: SVGStyleElement.disabled
on GitHub
No new external URLs
URL: /en-US/docs/Web/API/SVGStyleElement/title
Title: SVGStyleElement.title
on GitHub
No new external URLs
(this comment was updated 2022-08-12 04:40:56.619600)
@teoli2003 Do you think you might be able to review this?
Hi @teoli2003
you use innerText. I usually use textContent. I have no idea why I do this: any specific reason why you use the former? (I think innerText is defined on Element and textContent on Node, but I don't know of any other differences.
There are significant differences when reading a value, but not much as far as I can tell when writing - at least according to our docs. I didn't really think on this. For consistency I have changed all the changes here to use textContent.
Thanks for your detailed review. Should be good to look at again now.