Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement SVGElement.style #26777
Implement SVGElement.style #26777
Comments
|
Tried to implement const x = document.createElementNS("http://www.w3.org/2000/svg", "circle");
console.log(x.style);In Gecko, this will log an empty |
|
I have a suspicion that the element returned from createElementNS is a generic Element, rather than an SVGElement. It's worth checking if that is the case. |
|
Cool! Yes! It currently returns a generic Element. servo/components/script/dom/create.rs Lines 111 to 114 in 3d6fed8 Before implementing other svg elements, should we return a generic |
|
Yes, that should help. |
Introduce ElementCSSInlineStyle for SVGElement --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #26777 and fix #26032 and fix #21990 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Spec: https://drafts.csswg.org/cssom/#dom-elementcssinlinestyle-style
With implementing this, we should be able to fix #26032.