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've recently been playing around with shadowDOM and snabbdom and have run into an issue trying to patch an element directly inside a shadowRoot. (disclaimer: I'm still rather new to github and javascript in general, so do let me know if I'm doing it wrong.)
I'm trying to patch a div inside a shadowRoot as shown below:
<div>
#shadow-root
<div></div></div>
<div>
#shadow-root
<divid="test"></div></div>
The reason it is failing seems to be because shadowRoot is a DocumentFragment, and a DocumentFragment's children cannot refer to it using .parentElement.
👍 We're evaluating snabbdom and we'll need compatibility with ShadowDOM as well. We'll also need support for extending native elements. I'll open up a PR shortly with these changes.
Hello, I've recently been playing around with shadowDOM and snabbdom and have run into an issue trying to patch an element directly inside a shadowRoot.
(disclaimer: I'm still rather new to github and javascript in general, so do let me know if I'm doing it wrong.)
I'm trying to patch a div inside a shadowRoot as shown below:
The reason it is failing seems to be because shadowRoot is a DocumentFragment, and a DocumentFragment's children cannot refer to it using
.parentElement
.So I changed the
parentNode
function inhtmldomapi.js
to look like below and it now works.As I mentioned im still pretty new to all this and I'm not really familiar with the codebase, do you think this would be a safe change to make?
Cheers!
The text was updated successfully, but these errors were encountered: