Merge branch 'upstream' into optimize-templates-v3

This commit is contained in:
Evan Almloff committed 2022-12-07 18:29:02 -06:00
commit 99a4a9d45b
113 files changed
+347 -828

No files matched your search

+1 -1
View File
@@ -155,7 +155,7 @@ impl WebsysDom {
i.set_attribute(id.0 as u32, name, if *value { "true" } else { "false" }, "")
}
SetText { value, id } => i.set_text(id.0 as u32, value),
NewEventListener { name, scope: _, id } => {
NewEventListener { name, id, .. } => {
i.new_event_listener(name, id.0 as u32, event_bubbles(&name[2..]) as u8);
}
RemoveEventListener { name, id } => {
-8
View File
@@ -53,8 +53,6 @@
// - Do the VDOM work during the idlecallback
// - Do DOM work in the next requestAnimationFrame callback
pub use crate::cfg::Config;
use crate::dom::virtual_event_from_websys_event;
pub use crate::util::use_eval;
@@ -62,7 +60,6 @@ use dioxus_core::{Element, ElementId, Scope, VirtualDom};
use futures_util::{pin_mut, FutureExt, StreamExt};
mod cache;
mod cfg;
mod dom;
@@ -193,8 +190,6 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
// } else {
let edits = dom.rebuild();
log::debug!("Initial edits {:#?}", edits);
websys_dom.load_templates(&edits.templates);
websys_dom.apply_edits(edits.edits);
@@ -216,7 +211,6 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
_ = work => None,
_new_template = hotreload_rx.next() => {
todo!("Implement hot reload");
None
}
evt = rx.next() => evt
}
@@ -252,8 +246,6 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
// wait for the animation frame to fire so we can apply our changes
// work_loop.wait_for_raf().await;
log::debug!("edits {:#?}", edits);
websys_dom.load_templates(&edits.templates);
websys_dom.apply_edits(edits.edits);
}