Merge remote-tracking branch 'upstream/master' into optimize-templates-v3

This commit is contained in:
Evan Almloff committed 2022-12-07 17:20:31 -06:00
commit b79ad4f50e
68 files changed
+1030 -1281

No files matched your search

+6 -6
View File
@@ -11,7 +11,7 @@ use dioxus_core::{Mutation, Template, TemplateAttribute, TemplateNode};
use dioxus_html::{event_bubbles, CompositionData, FormData};
use dioxus_interpreter_js::{save_template, Channel};
use futures_channel::mpsc;
use rustc_hash::{FxHashMap, FxHashSet};
use rustc_hash::FxHashMap;
use std::{any::Any, rc::Rc};
use wasm_bindgen::{closure::Closure, JsCast};
use web_sys::{Document, Element, Event, HtmlElement};
@@ -106,15 +106,15 @@ impl WebsysDom {
}
}
for child in *children {
el.append_child(&self.create_template_node(child));
let _ = el.append_child(&self.create_template_node(child));
}
el.dyn_into().unwrap()
}
Text(t) => self.document.create_text_node(t).dyn_into().unwrap(),
DynamicText(_) => self.document.create_text_node("p").dyn_into().unwrap(),
Dynamic(_) => {
Text { text } => self.document.create_text_node(text).dyn_into().unwrap(),
DynamicText { .. } => self.document.create_text_node("p").dyn_into().unwrap(),
Dynamic { .. } => {
let el = self.document.create_element("pre").unwrap();
el.toggle_attribute("hidden");
let _ = el.toggle_attribute("hidden");
el.dyn_into().unwrap()
}
}
+1
View File
@@ -211,6 +211,7 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
let mut res = {
let work = dom.wait_for_work().fuse();
pin_mut!(work);
futures_util::select! {
_ = work => None,
new_template = hotreload_rx.next() => {