I have:
<template id="tmpl">
<li>
<a href="#">Link</a>
</li>
</template>
const tmpl = document.getElementById("tmpl");
const cloned = tmpl.content.cloneNode(true); // doesn't work
tmpl.content
doesn’t work if the first element is a li
element.
Problem:
I cannot clone the template child like ie:tmpl.content.cloneNode(true)
Expectation:
const cloned = tmpl.content.cloneNode(true)
returns
<li>
<a href="#">Link</a>
</li>
Why is this happening?