initial port of the UI kit
This commit is contained in:
@@ -111,6 +111,13 @@ func patch(parent js.Value, o, x *vdom.VNode) {
|
||||
default:
|
||||
x.Runtime = o.Runtime // adopt dom + listeners
|
||||
dom := rt(x).dom
|
||||
if !dom.Truthy() {
|
||||
// o was a hydration hole (no adopted DOM node, e.g. a server/client
|
||||
// markup mismatch). Recreate this node fresh instead of calling into an
|
||||
// undefined DOM handle.
|
||||
parent.Call("appendChild", createDOM(x))
|
||||
return
|
||||
}
|
||||
if x.Tag == "" {
|
||||
if x.Text != o.Text {
|
||||
dom.Set("nodeValue", x.Text)
|
||||
|
||||
Reference in New Issue
Block a user