Attach arbitrary dom elements
See original GitHub issueHi,
Is there a supported way of attaching arbitrary dom elements in components? Tried using this.base.appendChild
but it seems to cause a mess with the caching of components/elements.
In my case I want to use a datepicker that has nothing to do with preact or react wrapping it in a component for easy use.
Any help appreciated Thanks
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Can I add arbitrary properties to DOM objects? - Stack Overflow
Yes, you can add your own properties to DOM objects, but remember to take care ... HTML5 introduced a valid way of attaching...
Read more >Attach arbitrary dom elements #93 - preactjs/preact - GitHub
Hi, Is there a supported way of attaching arbitrary dom elements in components? Tried using this.base.appendChild but it seems to cause a ...
Read more >Using custom elements - Web Components | MDN
In this case we attach a shadow root to the custom element, use some DOM manipulation to create the element's internal shadow DOM...
Read more >Attributes and properties - The Modern JavaScript Tutorial
When the browser loads the page, it “reads” (another word: “parses”) the HTML and generates DOM objects from it. For element nodes ......
Read more >7 - In D7 how can I append an element to the DOM via ajax on ...
First visit example.com/ajax/insert to verify your content is being printed out. Your overall JS structure looks odd, plus you have a lot of ......
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
well @developit you’re the most responsive and helpful maintainer I came across 👍 and I mean it!
Just did what you suggested and it works perfectly!
Will throw in a
componentDidUnmount
to cleanup after as wellThanks alot
@developit thanks for this! that is very helpful, will try this in a sec