Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
var svgParams = {
view: {
viewBox: [0, 0, 20, 20],
meetOrSlice: "slice"
},
viewBox: [0, 0, 40, 40],
meetOrSlice: "meet",
fragmentIdentifier: "view"
};
appendSVGArrayWithParams(svgParams, "img");
</script>
<!-- Body gets populated by script -->
</body>
</html>