You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use loadSVGFromUrl/loadSVGFromString with an SVG <use /> tag that contains href instead of xlink:href. (<use href="#myId" />)
Expected Behavior
Should parse the SVG into the fabric canvas.
Actual Behavior
Throws a null reference error on xlink = el.getAttribute('xlink:href').substr(1) when using href.
Willing to make a PR for this if everything seems fine. Thinking of adding checks for either xlink:href and href. (eg. xlink = (el.getAttribute('xlink:href') || el.getAttribute('href')).substr(1)
The text was updated successfully, but these errors were encountered:
(https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href)
xlink:href is being deprecated for href
Version
2.3.0
Test Case
http://jsfiddle.net/uybeqc5r/
Steps to reproduce
Use
loadSVGFromUrl
/loadSVGFromString
with an SVG<use />
tag that containshref
instead ofxlink:href
. (<use href="#myId" />
)Expected Behavior
Should parse the SVG into the fabric canvas.
Actual Behavior
Throws a null reference error on
xlink = el.getAttribute('xlink:href').substr(1)
when usinghref
.Willing to make a PR for this if everything seems fine. Thinking of adding checks for either
xlink:href
andhref
. (eg.xlink = (el.getAttribute('xlink:href') || el.getAttribute('href')).substr(1)
The text was updated successfully, but these errors were encountered: