- From: Joseph Orbegoso Pea <notifications@github.com>
 - Date: Tue, 18 Oct 2016 14:42:11 -0700
 - To: w3c/webcomponents <webcomponents@noreply.github.com>
 
Received on Tuesday, 18 October 2016 21:42:39 UTC
For example, here's another idea, using selectors:
```html
<!-- Light tree -->
<div class='host'>
  <img slot="some-slot" ... />
</div>
```
```html
<!-- Shadow tree -->
<div>
  <div class="image-holder">
  </div>
</div>
```
```js
let root = document.querySelector('.host').attachShadow({mode: 'closed'})
root.innerHTML = `... the shadow tree markup from above ...`
root.defineSlot('some-slot', '.image-holder') // find the first match, similar to querySelector
// alternatively, could take an actual instance:
root.defineSlot('some-slot', root.querySelector('.image-holder'))
```
Get what I mean? It would eliminate from having to use an element that doesn't really behave like an element, `<slot>` is like a weird special element that really isn't one.
-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/589#issuecomment-254648020
Received on Tuesday, 18 October 2016 21:42:39 UTC