svelte
svelte copied to clipboard
[fix] [PoC] Fix parent component link for web components
This is a proof of concept for fixing the parent component link for nested web components, e.g. when using
<my-parent-component>
<my-child-component></my-child-component>
</my-parent-component
we want the child to have a parent component link set appropriately, so that e.g. the context API (see #3422) works correctly. The test itself is a bit rough and likely can be optimized by checking for the $$ property first, but I'd like to get idea out first.