-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Preact and custom elements #405
Comments
This is fixed in version 7. |
woho! that works very well for me 👍 thanks |
Awesome, I really appreciate you opening this issue since I didn't have time to manually test this fix out myself. I was convinced it would work and I'm happy it does! Thanks @oskbor!! |
Hi @oskbor -- I'm running into a similar issue you described (mine is #344). So my custom elements are rendering as-expected on initial page render, but when navigating to subsequent views (in a SPA etc), they stop updating. They also maintain their own internal nodes, and after inspecting the nodes it seems like there contents have been wiped out. Seems like Preact is breaking the shadow dom for custom elements. Wondering if you had to do anything in addition to get this working aside from just bumping preact version? I've tried the latest versions and still running into issues. :( Any input much appreciated. |
Hi, I didn't need to do anything more, but also I didn't use shadow dom in
my component.
I no longer have access to that code base, so I can't dig into it any more.
Sorry I couldn't be more helpful
…On Sat, May 13, 2017, 18:30 Tom ***@***.***> wrote:
Hi @oskbor <https://github.com/oskbor> -- I'm running into a similar
issue you described (mine is #344
<#344>). So my custom elements
are rendering as-expected on initial page render, but when navigating to
subsequent views (in a SPA etc), they stop updating.
They also maintain their own internal nodes, and after inspecting the
nodes it seems like there contents have been wiped out. Seems like Preact
is breaking the shadow dom for custom elements.
Wondering if you had to do anything in addition to get this working aside
from just bumping preact version? I've tried the latest versions and still
running into issues. :(
Any input much apprecaited.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#405 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPNfX-NZAospyvvnB6UPk8TPuV7k5LLks5r5dq8gaJpZM4KyUv0>
.
|
Hello,
I have a native custom element, lets call it
<custom-video-player>
.It handles its own children. The children can be a
<video>
or an<image>
for example.Unfortunately preact clobbers the child dom that I create in my
createdCallback
and the entire component breaks.Is there an option I can pass in to make preact accept the component as it is and not traverse its children?
I am guessing this is related/identical to #39
The text was updated successfully, but these errors were encountered: