Skip to content
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

Canvas move <slot /> to shadow DOM <div /> #158

Closed
vatro opened this issue Sep 2, 2022 · 0 comments
Closed

Canvas move <slot /> to shadow DOM <div /> #158

vatro opened this issue Sep 2, 2022 · 0 comments
Assignees
Milestone

Comments

@vatro
Copy link
Owner

vatro commented Sep 2, 2022

While fixing #100, I realized that it doesn't matter where we set DOM target to with DOM-less components. If they're added via markup, the context (important) will be shared according to the hierarchy in the markup. If we create them manually (via e.g. new Mesh( ... ), the target property can be set to literally anything as it seems, important is the correct context (e.g. a child component has to be assigned the context of the parent component).

Since the only DOM elements we're using / generating are shadow DOM elements, it feels more consistent to put the <slot /> inside the shadow DOM <div />, so that the light DOM (the <canvas> element) is empty. Doing this doesn't break anything e.g. concerning interactivity etc. (checked).

@vatro vatro added this to the 1.0.0-next.1 milestone Sep 2, 2022
@vatro vatro self-assigned this Sep 2, 2022
@vatro vatro closed this as completed in ba47e0b Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant