Feat: move webview logic into library

This commit is contained in:
Jonathan Kelley committed 2021-02-25 18:44:00 -05:00
1 parent 18a7a1f9c4
commit 32b45e5ba1
10 files changed
+249 -514

No files matched your search

+3 -8
View File
@@ -98,12 +98,7 @@ impl VirtualDom {
component.run::<()>();
let old = component.old_frame();
let new = component.new_frame();
dbg!(old);
dbg!(new);
diff_machine.diff_node(old, new);
diff_machine.diff_node(component.old_frame(), component.new_frame());
Ok(diff_machine.consume())
}
@@ -136,7 +131,7 @@ impl VirtualDom {
let EventTrigger {
component_id,
listener_id,
event: _,
event: source,
} = event;
let component = self
@@ -151,7 +146,7 @@ impl VirtualDom {
.as_ref();
// Run the callback with the user event
listener();
listener(source);
// Mark dirty components. Descend from the highest node until all dirty nodes are updated.
let mut affected_components = Vec::new();