Answer the question
In order to leave comments, you need to log in
What namespace is valid for xml attributes inside svg?
The task is to start the svg animation through js. My (not) implementation - create a dom node with the animate tag, set the necessary attributes, insert it at the end of the svg. The problem is when doing
elem.setAttributeNS('http://www.w3.org/2000/xmlns', 'xmlns:xlink', 'http://www.w3.org/1999/xlink')
Uncaught DOMException: Failed to execute 'setAttributeNS' on 'Element': ' www.w3.org/2000/xmlns ' is an invalid namespace for attributes.
.setAttribute()
and .createElement()
, then the animation simply does not work without any errors. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question