I am creating a clipPath element to add to an svg.
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
var clipElement = document.createElementNS('http://www.w3.org/2000/svg', 'clipPath');
svg.appendChild(clipElement);
When rendered to the dom, it changes the element to lowercase clippath, which isn't recognized by the svg (must be camelcased as clipPath).
I am looking for a way to force Chrome to respect the camelcase.
What do you mean by "isn't recognized by the svg"? For me, everything works as expected:
I'm not sure why the Elements panel of the Dev-Tools shows the node name without camel case, but it seems this does not have to disturb you. The
nodeName
property is still camel case, and also serializing the document will yield camel case.