Namespaced attributes do not update
Using SVG sprites with <use xlink:href="" /> will not update the icon.
The reason is that getAttributeNS and setAttributeNS DOM APIs are inconsistent in it's arguments.
E.g.: lets say 'foo:bar' ('foo' being the namespace and 'bar' the local attribute name):
getAttributeNSonly needs thelocalName, i.e.getAttributeNS('https://www.w3.org/1999/foo', 'bar');getAttributeNS(namespace, localName)https://www.w3.org/TR/DOM-Level-2-Core/glossary.html#dt-localname A local name is the local part of a qualified name. This is called the local part in Namespaces in XML [Namespaces].- BUT
setAttributeNSexpects it's fully qualified name, i.e.setAttributeNS('https://www.w3.org/1999/foo', 'foo:bar');setAttributeNS(namespace, qualifiedName, value)https://www.w3.org/TR/DOM-Level-2-Core/glossary.html#dt-qualifiedname A qualified name is the name of an element or attribute defined as the concatenation of a local name (as defined in this specification), optionally preceded by a namespace prefix and colon character. See Qualified Names in Namespaces in XML [Namespaces].
Affected Code https://github.com/patrick-steele-idem/morphdom/blob/master/src/morphAttrs.js#L19-L23
same issue for nanomorph https://github.com/choojs/nanomorph/issues/101
Issue originally found in https://github.com/axa-ch/patterns-library/pull/411
SVG2 has fairly wide support now and IE11 is end-of-life. It may not be worth changing the code but encouraging folks to remove xlink:href.