wip: basic support for scheduled rendering

This commit is contained in:
Jonathan Kelley committed 2021-07-14 18:19:51 -04:00
1 parent 80e6c25698
commit c52af221f7
8 files changed
+93 -80

No files matched your search

+2 -1
View File
@@ -37,6 +37,7 @@ impl<'bump> RealDom<'bump> for WebviewDom<'bump> {
}
fn request_available_node(&mut self) -> RealDomNode {
todo!()
self.node_counter += 1;
RealDomNode::from_u64(self.node_counter)
}
}
+6 -4
View File
@@ -87,8 +87,9 @@ impl<T: Properties + 'static> WebviewRenderer<T> {
// Serialize the edit stream
let edits = {
lock.rebuild(&mut real).unwrap();
serde_json::to_value(&real.edits).unwrap()
let mut edits = Vec::new();
lock.rebuild(&mut real, &mut edits).unwrap();
serde_json::to_value(edits).unwrap()
};
// Give back the registry into its slot
@@ -108,8 +109,9 @@ impl<T: Properties + 'static> WebviewRenderer<T> {
// Serialize the edit stream
let edits = {
lock.rebuild(&mut real).unwrap();
serde_json::to_value(&real.edits).unwrap()
let mut edits = Vec::new();
lock.rebuild(&mut real, &mut edits).unwrap();
serde_json::to_value(edits).unwrap()
};
// Give back the registry into its slot