Consider Element.assignedSlot?
robrez opened this issue · comments
Rob Resendez commented
Given an element with slots such as the following:
my-element
#shadowRoot
<div class="head"><slot name="head"></slot></div>
<div class="body"><slot></slot></div>
And utilization such as this:
<my-element>
<div body>Body content is second</div>
<div head slot="head">Title is first</div>
</my-element>
Perhaps the following should return -1
?
compare(querySelector("div[body]"), querySelector("div[head]"))
Consider, also, styling within the element hosting the slots could very well apply z-indexing, etc.