elix/elix

named slot in embedded component ends up in default slot

geonanorch opened this issue · 3 comments

I am trying to use elix from within a web component framework (Riot.js). See this minimal demo: https://plnkr.co/edit/7m76cYjdj4Xl9fqQ.

I found out that named slots within the elix component are not handled correctly (default slots are fine). It looks like those slots have their name stripped: they end up next to the default slot content for the elix component.

Is elix doing any specific processing on named slots? Do you see a specific reason why this is happening? I am aware that mixing elix and Riot.js might be tricky, this is not so much a bug report as a request for guidance.

I can't think of any circumstance in which an Elix component would modify the slot attribute of its own light DOM children.

If I create a completely vanilla test-element and use that in your Riot component, the debug panel shows that the named slots are stripped: https://plnkr.co/edit/zit0qLcuwE1zBjZ8.

I'm not familiar with Riot, but at first glance this looks to be an issue with Riot.

Shame on me, I should have thought of trying that. I am putting that information in a Riot.js issue and closing this. Thank you for your help!

As a side note you might like Riot.js: like elix it sticks closely to standards and tries to offer a minimal clean framework to build upon.

For whomever might be interested: the issue was fixed in Riot.js v4.13. Elix and Riot.js work well together!