Zacharias Enochsson
Zacharias Enochsson
Unless you need IE11 support (which I don't think hyperapp supports anyway) Proxy is fine! I've used the approach suggested here in the past as well and really it's fine...
@frenzzy I don't think skipping over children of custom elements is the right approach here. You want to be able to compose the with children just like any other html...
@naltatis I'm not entirely sure why, but I figured out that this works: ```js connectedCallback() { setTimeout(_ => { console.log("example-alert connected - rendering a button"); this.innerHTML = "alert()"; this.querySelector("button").addEventListener("click", ()...
@naltatis Ah ok. You can tell hyperapp to skip the subtree of a specific node if you return the exact same instance of the virtual node, as the previous render...
I'm still not exactly sure what's going on. But I verified that this is *only* a problem when "hydrating" -- ie when the pre-rendered markup already contains the `` custom...
Oooh, *now* I get it. Before hyperapp does it's first render, the markup is this: ```html click the button alert() ``` ... because the custom element inserts the button into...
@naltatis yeah, that's expected since you're not moving the actual elements with event listeners, but creating new ones to mimic the previous ones.
Thinking about it a little more. Maybe @frenzzy had a point about children and custom elements though... We shouldn't avoid them during `patch`, but perhaps we should ignore children during...
I know it's not helpful in this case, but I've got to say: my general feeling about using custom-elements in vdom-frameworks is that the only safe bet is to use...
@dennisreimann If I were you, I'd make a PR! The contribution guidelines are here: https://github.com/jorgebucaran/hyperapp/blob/master/CONTRIBUTING.md Beyond the info in there, It's also a good idea to prepare a small example...