Я создал спрайт-лист со значками, и у меня возникают проблемы с добавлением определенных значков / символов из него с помощью javascript. Кто-нибудь может проверить приведенный ниже примерный код для любых проблем и точно определить, что я делаю неправильно. '# Path10' - это значок из листа спрайта.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="Interaktywny poradnik szybkiego startu dla Brackets.">
<link rel="stylesheet" href="test.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 100% 3vh" class=" row_0 headerrow">
<g id="imagehere"></g>
</svg>
<script>
let iconimport = "/exampleimage.svg#path10";
let imgcreate = document.createElementNS('http://www.w3.org/2000/svg', 'image');
imgcreate.setAttributeNS(null, 'height', '200');
imgcreate.setAttributeNS(null, 'width', '200');
imgcreate.setAttributeNS('http://www.w3.org/1999/xlink','href', iconimport);
imgcreate.setAttributeNS(null, 'x', '40');
imgcreate.setAttributeNS(null, 'y', '40');
document.getElementById("imagehere").append(imgcreate);
</script>
</body>
</html>