Hello everybody! I am in need of some assistance regarding SVG. I am currently working on writing unit tests and I need to add an object with the type SVGLengthList
to a method. I have gone through the documentation provided by W3, however, I am unsure of how to obtain this object. I have attempted operations within the DOM where there are 3 svg
elements present, but so far I can only manage to get an object of type SVGLength
.
var $document = $injector.get("$document");
svgParent = $document.find('svg')[0];
svgLength = $document[1].createSVGLength();
Here is a snippet of my DOM:
var virtualDOM = [
'<html>',
'<body>',
'<svg>',
ic_dialog_info,
ic_edit,
'</svg>',
ic_down,
'</body>',
'</html>'
].join("");
In this code, ic_dialog_info, ic_edit, ic_down represent svg icons.