MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / makeSVG

Function makeSVG

scripts/libs/qrcode/index.js:190–195  ·  view source on GitHub ↗
(tag, attrs)

Source from the content-addressed store, hash-verified

188 this.clear();
189
190 function makeSVG(tag, attrs) {
191 var el = document.createElementNS('http://www.w3.org/2000/svg', tag);
192 for (var k in attrs)
193 if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]);
194 return el;
195 }
196
197 var svg = makeSVG("svg" , {'viewBox': '0 0 ' + String(nCount) + " " + String(nCount), 'width': '100%', 'height': '100%', 'fill': _htOption.colorLight});
198 svg.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink");

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected