Unable to create svg elements with CSS selectors
See original GitHub issueSomething like this never works —
h('line.form-field-underline-default', {attrs: {x1: '0', y1: '0', x2: '100', y2: '0'}})
ERROR:
Uncaught TypeError: Cannot assign to read only property 'className' of object '#<SVGLineElement>'
at createElm (snabbdom.js:75)
at createElm (snabbdom.js:78)
at createElm (snabbdom.js:78)
at createElm (snabbdom.js:78)
at createElm (snabbdom.js:78)
at updateChildren (snabbdom.js:172)
at patchVnode (snabbdom.js:212)
at updateChildren (snabbdom.js:151)
at patchVnode (snabbdom.js:212)
at updateChildren (snabbdom.js:151)
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Why is the :hover selector not working on this SVG element?
When I use the selector #apple:hover to select an SVG element, the hover doesn't seem to be working. Why is this not working?...
Read more >Targeting SVG icons with CSS not working in Webkit
I'm working on a project that uses some SVG icons that I'd like to be able to style with css for different scenarios...
Read more >Selectors - WebdriverIO
The WebDriver Protocol provides several selector strategies to query an element. WebdriverIO simplifies them to keep selecting elements simple.
Read more >Select Page Elements | Basic Guides - TestCafe
To interact with the page, use test actions. Create Selectors. Pass a CSS selector string or a client-side function to the Selector constructor...
Read more >SVG and CSS - SVG: Scalable Vector Graphics | MDN
Make a new SVG document as a plain text file, doc8.svg . ... complex CSS selectors on elements referenced via <use> elements, at...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
IMHO a selector should just work everywhere don’t u think? This is an implementation detail that as a consumer of the library, I shouldn’t be concerned about. I’d be happy to send a PR for it.
Ok thanks! Sending the PR in a few hours.