Problem: I'm having trouble embedding an SVG document (Logo.svg) into an SVG element (QR Code) and having the document (which is a logo) persist when downloading using SVGSaver. Expected: The logo persists when the file is downloaded via SVGSaver. Actual: Just the QR Code is downloaded with no logo. Additional Information: So far I've tried attaching the document as a dataurl, a base64 string, and even tried creating the paths manually like shown below. None of which have been fruitful.
const tagid = document.getElementById('tagid').value;
var tag = new QRCode({
content: `https://app.taggini.com/scan/${tagid}`,
padding: 0.5,
width: 400,
height: 400,
color: "#000000",
background: "#ffffff",
ecl: "H",
join: true,
});
var svgElement = tag.svg();
$("#tagModalWrapper").html(svgElement);
$("#tagModalWrapper > svg").attr("id", "tagSVG");
$("#tagSVG").attr("height", "450");
var tagLogoSVG = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
var tlGroup = document.createElementNS('http://www.w3.org/2000/svg', 'g');
var tlPath1 = document.createElementNS('http://www.w3.org/2000/svg', 'path');
var tlPath2 = document.createElementNS('http://www.w3.org/2000/svg', 'path');
tagLogoSVG.setAttributeNS('http://www.w3.org/2000/svg', 'height', '120');
tagLogoSVG.setAttributeNS('http://www.w3.org/2000/svg', 'width', '120');
tagLogoSVG.setAttributeNS('http://www.w3.org/2000/svg', 'x','140');
tagLogoSVG.setAttributeNS('http://www.w3.org/2000/svg', 'y','140');
tagLogoSVG.setAttributeNS('http://www.w3.org/2000/svg', 'xlmns','http://www.w3.org/2000/svg');
tlPath1.setAttributeNS('http://www.w3.org/2000/svg', 'd', 'M341.5,1035.9c-57.2,0-109.8-33.8-132.3-87.3c-23.5-54.4-11.3-118.2,30-160.5l36.6-36.6 c-39.4-33.8-76-72.2-112.6-111.7l-1.9-1.9c-8.1-8.8-15-16-20.6-21.6c-7.5-7.5-21.6-23.5-61-66.6c-0.9-0.9-1.9-1.9-2.8-2.8l-3.8-3.8 C33.8,497.3,0,457.9,0,379.1c0-126.7,103.2-229.9,229.9-229.9c51.6,0,99.5,17.8,137.9,47.8c24.4-18.8,51.6-34.7,79.8-47.9 c13.1-72.2,76.9-126.7,152.9-126.7s139.8,54.4,152.9,126.7c25.3,11.3,49.7,25.3,72.2,42.2c1.9-2.8,2.8-4.7,4.7-6.6 c-3.8-4.7-8.4-9.4-12.2-14.1c-25.3-31-31-74.1-13.1-110.7C822,23.5,859.5,0,899.8,0h262.7c56.3,0,110.7,24.4,148.2,66.6 c36.6,42.2,53.5,97.6,46,153.9c-3.8,30-15,58.2-31,81.6c4.7,5.6,9.4,12.2,14.1,18.8c14.1,17.8,22.5,40.4,22.5,64.7v134.2 c0,79.8-63.8,144.5-142.6,145.4c-5.6,0-90.1,3.8-181.1,46c-36.6,16.9-69.4,37.5-99.5,58.2l20.6,20.6l2.8,2.8 c39.4,42.2,49.7,102.3,28.2,154.8c-21.6,53.5-75.1,90.1-133.2,90.1h-516V1035.9L341.5,1035.9z');
tlPath1.setAttributeNS('http://www.w3.org/2000/svg', 'style', 'fill:#FFFFFF;');
tlPath2.setAttributeNS('http://www.w3.org/2000/svg', 'd', 'M1216.1,423.2H878.3l-47-74.2c-46.9-73.2-123.9-119.2-209.2-126.7c16.9-8.4,28.2-25.3,28.2-45c0-28.1-22.5-50.7-50.7-50.7 s-50.7,22.5-50.7,50.7c0,19.7,11.3,37.5,28.2,45C491.7,229,413.8,275.9,367.8,349l-14.1,21.6c-5.6-64.7-59.1-117.3-124.8-117.3 s-124.8,56.3-124.8,124.8c0,41.3,13.1,55.4,51.6,100.4c80.7,87.3,57.2,62.9,80.7,87.3c66.6,70.4,124.8,132.3,201.7,171.7 L313.4,862.3c-11.3,11.3-15,29.1-8.4,44.1s20.6,24.4,36.6,24.4h515.1c16,0,31-9.4,36.6-24.4c6.6-15,2.8-31.9-8.4-44.1L773.2,750.6 c6.6-2.8,13.1-6.6,19.7-10.3c15-9.4,31-20.6,49.7-33.8c39.4-28.2,89.1-62.9,151.1-92c116.3-53.5,222.4-55.4,223.3-55.4 c21.6,0,39.4-17.8,39.4-40.3v-56.3C1256.4,441,1238.6,423.2,1216.1,423.2L1216.1,423.2z M434.4,391.3 c35.7-56.3,97.6-90.1,165.1-90.1S728,335,764.6,391.3l19.7,31H414.7L434.4,391.3L434.4,391.3z M229,334c24.4,0,44.1,19.7,44.1,44.1 s-19.7,44.1-44.1,44.1s-44.1-19.7-44.1-44.1S203.6,334,229,334L229,334z M689.7,779.7l70.4,70.4H438.2l70.4-70.4H689.7L689.7,779.7 z M959.9,542.3c-69.4,31.9-123.9,71.3-164.2,99.5c-16.9,12.2-31.9,22.5-45,30c-28.2,16.9-75.1,28.2-119.2,28.2 c-160.5,0-230.8-75.1-336.9-188.6l-8.4-8.4h781.6C1034,512.3,997.4,524.5,959.9,542.3L959.9,542.3z M1256.4,385.6 c-30-47.9-82.6-79.8-143.6-79.8H989c-5.6,0-10.3-4.7-10.3-10.3s4.7-10.3,10.3-10.3h169.8c46,0,87.3-32.8,92.9-78.8 c7.5-55.4-35.7-102.3-90.1-102.3H898.9c41.3,50.7,103.2,79.8,168,79.8h94.8c5.6,0,10.3,4.7,10.3,10.3s-4.7,10.3-10.3,10.3h-169 c-47.8,0-90.1,35.7-93.8,83.5c-3.8,49.7,32.8,91,80.7,96.6L1256.4,385.6L1256.4,385.6L1256.4,385.6z');
tlGroup.appendChild(tlPath1);
tlGroup.appendChild(tlPath2);
tagLogoSVG.appendChild(tlGroup);
$("#tagSVG").append(tagLogoSVG);