fix: ssr + hydration event listeners
This commit is contained in:
1 parent
8c7473d194
commit
c1a5d4e11f
2 files changed
+17
-14
No files matched your search
@@ -116,7 +116,14 @@ impl WebsysDom {
|
||||
// we cant have the last node be text
|
||||
let mut last_node_was_text = false;
|
||||
for child in vel.children {
|
||||
self.rehydrate_single(nodes, place, dom, &child, &mut last_node_was_text)?;
|
||||
self.rehydrate_single(nodes, place, dom, child, &mut last_node_was_text)?;
|
||||
}
|
||||
|
||||
for listener in vel.listeners {
|
||||
self.new_event_listener(
|
||||
listener.event,
|
||||
listener.mounted_node.get().unwrap().as_u64(),
|
||||
);
|
||||
}
|
||||
|
||||
place.pop();
|
||||
@@ -142,7 +149,7 @@ impl WebsysDom {
|
||||
|
||||
VNode::Fragment(el) => {
|
||||
for el in el.children {
|
||||
self.rehydrate_single(nodes, place, dom, &el, last_node_was_text)?;
|
||||
self.rehydrate_single(nodes, place, dom, el, last_node_was_text)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user