When trying to mount to a dynamically created svg element (using document.createElement('svg'))`, I see the error:
index.mjs:576 Uncaught Error: [drauu] can only mount to a SVG element
It looks like the test for svg element only allows for lowercase tagName = 'svg', whereas a dynamically created svg element has upppercase tagName = 'SVG'.
When trying to mount to a dynamically created svg element (using
document.createElement('svg')
)`, I see the error:index.mjs:576 Uncaught Error: [drauu] can only mount to a SVG element
It looks like the test for svg element only allows for lowercase
tagName = 'svg'
, whereas a dynamically created svg element has upppercasetagName = 'SVG'
.Both uppercase and lowercase values for
tagName
do occur under different circumstances: (https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName) so the check to see if the element is in fact an svg element might need to be refined.It doesn't seem to be an issue for svg elements that are already defined in the html (i.e
tagname
is lowercase in that case).