-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Figure out hot to handle shadow_root
and shadow_dom_target
in non-svelthree 'container' components
#72
Comments
Turns out, the "problem" has something to do with Svelte. If a non-svelthree 'container' component has a child component with slots and I've filed a Svelte issue concerning this, but I guess I'll have to find some workaround, like... simply avoiding slots / referencing slots inside non-svelthree 'containers' / 'wrappers'? 🤔 ... no. |
ok, this is a good DUCKTAPE-FIX candidate:
$: if (shadow_root_el && mesh && !shadow_dom_target) create_shadow_dom_target()
async function create_shadow_dom_target() {
...
// DUCKTAPE getContext wrong order fix
await tick()
const parents_shadow_dom_target = our_parent.userData.svelthreeComponent.shadow_dom_target
// debug
if(!parents_shadow_dom_target) {
console.error("Mesh > ...after tick: couldn't find 'parents_shadow_dom_target'!", parents_shadow_dom_target)
} else {
console.log("Mesh > ...after tick:", {parents_shadow_dom_target})
}
...
} has to be applied to all components generating shadow DOM elements. |
Unfortunately this is still not 100% fixed... After fiddling a bit, I think the real fix would be to share Removing |
Ok, will deploy the new fix in a minute. |
Given:
Problem:
svelthree/src/components/Mesh.svelte
Lines 342 to 347 in 07120b0
The text was updated successfully, but these errors were encountered: