Open thomas-darling opened 4 years ago
@thomas-darling I’m not sure how fast we’ll be able to get around to fixing this particular scenario in vCurrent. If this is critical to you, one thing you could do is use the shadydom polyfill, turning it on to emulate always, and then set your custom elements to use shadow dom.
I'm submitting a bug report
Current behavior:
app.html Let's say we have an app, which uses the component
foo
, providing content for its named slots.foo.html The component
foo
uses the componentbar
. The content of the first slot infoo
should be projected into the default slot inbar
. The content of the second slot infoo
should be projected into the named slot inbar
.bar.html The component
bar
has a default slot and a named slot, and presents the content of those.The result of the above looks like this - note how the content of the first slot is lost:
Expected/desired behavior:
The result of the above should like this:
For reference, here's the above, implemented using native Shadow DOM: https://codepen.io/anon/pen/RzvZWB
It should be possible to project the contents of a named slot in a component, into the default slot of a child component.