hi i having problem to add elements with they children elements in shadow root:
// in shadow root:
<ul class="breadcrumb">
</ul>
<script>
var number = shadowRoot.host.attributes['number'].nodeValue;
var breadcrumb = shadowRoot.querySelector(".breadcrumb");
var li = document.createElement("li");
for(var i=0; i<number; i++)
{
breadcrumb.append(li, "text");
}
i did this but i only can add one element and no children elements, i want to add this to my ul tag:
<li><slot name="dynamic-value"></slot></li>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…