implement hydration
This commit is contained in:
1 parent
e9dd5a94c7
commit
696109db10
6 files changed
+280
-168
No files matched your search
@@ -22,9 +22,11 @@ use crate::Config;
|
||||
|
||||
pub struct WebsysDom {
|
||||
document: Document,
|
||||
#[allow(dead_code)]
|
||||
pub(crate) root: Element,
|
||||
templates: FxHashMap<String, u32>,
|
||||
max_template_id: u32,
|
||||
interpreter: Channel,
|
||||
pub(crate) interpreter: Channel,
|
||||
}
|
||||
|
||||
pub struct UiEvent {
|
||||
@@ -72,10 +74,14 @@ impl WebsysDom {
|
||||
}
|
||||
}));
|
||||
|
||||
dioxus_interpreter_js::initilize(root.unchecked_into(), handler.as_ref().unchecked_ref());
|
||||
dioxus_interpreter_js::initilize(
|
||||
root.clone().unchecked_into(),
|
||||
handler.as_ref().unchecked_ref(),
|
||||
);
|
||||
handler.forget();
|
||||
Self {
|
||||
document,
|
||||
root,
|
||||
interpreter,
|
||||
templates: FxHashMap::default(),
|
||||
max_template_id: 0,
|
||||
|
||||
Reference in new issue
Block a user