You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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. :(
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>
.
Activity
developit commentedon Nov 15, 2016
This is fixed in version 7.
npm I preact@beta.Also I believe it only affects polyfilled custom Elements.
oskbor commentedon Nov 15, 2016
woho! that works very well for me 👍 thanks
developit commentedon Nov 15, 2016
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!!
tconroy commentedon May 13, 2017
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.
oskbor commentedon May 13, 2017