Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svg tag viewBox becomes viewbox #61

Open
oceangroove opened this issue Oct 18, 2021 · 1 comment
Open

svg tag viewBox becomes viewbox #61

oceangroove opened this issue Oct 18, 2021 · 1 comment
Labels
category: parsing Correctness and Edge Cases. Hail the DOM type: bug Something isn't working as intended

Comments

@oceangroove
Copy link

In HiccupRepresentable and HickoryRepresentable if the node type is Attribute then lower-case-keyword is applied.
However, from

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute

some svg tags have uppercase characters like viewBox (there are others). This causes a warning in both Chrome and Firefox under re-frame (originating from react) but is not in itself an error in either browser. ie, an svg image with viewbox does not cause a warning.

Example warning:
react-dom.inc.js:82 Warning: Invalid DOM property viewbox. Did you mean viewBox?

re-frame 1.2.0 cljs 1.10.516

@port19x port19x added type: bug Something isn't working as intended priority 2: medium category: parsing Correctness and Edge Cases. Hail the DOM and removed priority 2: medium labels Apr 11, 2023
@port19x
Copy link
Contributor

port19x commented Apr 19, 2023

In select.cljc, the function attr is responsible for that lowercase conversion.
A patch would be trivial.
The code is commented with a link to the html spec, which alledgedly states that an html5 parser should always normalize to lowercase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: parsing Correctness and Edge Cases. Hail the DOM type: bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants