Preact and custom elements
See original GitHub issueHello,
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
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Web Components | Preact
Custom Elements generally rely on custom properties in order to support setting complex values that can't be expressed as attributes. This works well...
Read more >preactjs/preact-custom-element - GitHub
preact -custom-element. Generate/register a custom element from a preact component. As of 3.0.0, this library implements the Custom Elements v1 spec.
Read more >Custom elements and Preact - James Hill
Custom elements and Preact ... Preact is a fantastic fit for bringing the power of a virtual DOM, and JSX, to existing projects....
Read more >How to use Web Components in Preact and TypeScript
Web Components are created using a combination of several stand-alone technologies such as Custom Elements, Shadow DOM, and HTML templates.
Read more >preact-custom-element examples - CodeSandbox
Learn how to use preact-custom-element by viewing and forking preact-custom-element example apps on CodeSandbox.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed in version 7.
npm I preact@beta
. Also I believe it only affects polyfilled custom Elements.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 notifications@github.com wrote: