SVGSVGElement is missing method node.getAttribute
See original GitHub issueRunning the following code with LitElement
html`<svg viewport="0 0 1 1"></svg>`
Results in the following error:
TypeError: Cannot read property 'split' of null
40 | var attributeValue = node.getAttribute(attributeLookupName);
41 | node.removeAttribute(attributeLookupName);
> 42 | var statics = attributeValue.split(exports.markerRegex);
| ^
43 | this.parts.push({ type: 'attribute', index: index, name: name_1, strings: statics });
44 | partIndex += statics.length - 1;
SVGElement should extend Element but extends HTMLElement. Is that why?
Link to inheritence chain for SVGSVGElement: https://developer.mozilla.org/en-US/docs/Web/API/SVGSVGElement
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Read Attributes of SVG-Elements in HTML via JS
This way i can retrieve the Attributes via getAttribute() consistently in all browsers. Share.
Read more >SVGSVGElement - Web APIs | MDN
Chrome Edge
SVGSVGElement Full support. Chrome1. Toggle history Full support. Edge12. Toggle hist...
animationsPaused Full support. Chrome1. Toggle history Full support. Edge79. Toggle hist...
checkEnclosure Full...
Read more >SVGSVGElement | typescript - v3.7.7 - Microsoft Open Source
Interface SVGSVGElement. Provides access to the properties ... node is a CDATASection node. ... Occurs when the play method is requested. param. The...
Read more >SVGSVGElement | Aspose.SVG for .NET API Reference
Methods ; HasAttributeNS(string, string), Returns true when an attribute with a given local name and namespace URI is specified on this element or...
Read more >TypeError: getAttribute is not a function in JavaScript
To solve the "getAttribute is not a function" error, make sure to call the `getAttribute()` method on a valid DOM element and place...
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 FreeTop 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
Top GitHub Comments
Thank you for reporting @Atyn!
I will look into it as soon as possible 🙂
@capricorn86 That sounds good! It was fixed when upgrading so it is no longer a problem 👍. Thanks! 🙂