-
-
Notifications
You must be signed in to change notification settings - Fork 968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined scope for slots in nested custom elements #2877
Comments
This issue was fixed in riot@4.13.6. |
I have just noticed that the HTML output for native web components is not yet correct (the |
This issue was completely fixed in Riot.js@4.14.0 |
Thank you @GianlucaGuarini , I can confirm that my issue is fixed with riot@4.14.0. |
Help us to manage our issues by answering the following:
I have nested riot components. The child component uses slots. When in the parent component I provided content for those slots AND that content contains references to the parent component's scope, I get a 'scope is undefined' at run time.
This exception however ONLY occurs if the slot is placed within a custom element (Riot or other):
I verified that the issue is not as simple as the child's scope being used instead of the parent's: exporting a
my-var
frommy-tag
still yields an undefined scope. I also had a look at existing issues, it sounds similar to #2842, but no slots there.At any rate it looks like the nature of embedded elements (custom or not) influences the processing of slots at a higher level.
Here a plunk.
I was not able to reproduce the issue without a nested component: if I mount a riot component explicitly then the slot content is not recognized (would be a separate issue, but mentioning it here in case there is a connection).
Firefox 78.0.1
Vivaldi 3.1.1929.45 (Chrome 83.0.4103.119)
latest: 4.13.4
The text was updated successfully, but these errors were encountered: