wip: groundwork for noderefs

This commit is contained in:
Jonathan Kelley committed 2021-08-09 17:09:33 -04:00
1 parent a44e9fcffa
commit c1afeba1ef
21 files changed
+184 -103

No files matched your search

+1 -7
View File
@@ -1,6 +1,6 @@
//! webview dom
use dioxus_core::{DomEdit, ElementId, RealDom, ScopeId};
use dioxus_core::{DomEdit, ElementId, ScopeId};
use DomEdit::*;
pub struct WebviewRegistry {}
@@ -30,9 +30,3 @@ impl WebviewDom<'_> {
self.registry
}
}
impl<'bump> RealDom for WebviewDom<'bump> {
fn raw_node_as_any(&self) -> &mut dyn std::any::Any {
todo!()
// self.edits.push(PushRoot { root });
}
}
+4 -4
View File
@@ -117,8 +117,8 @@ impl<T: Properties + 'static> WebviewRenderer<T> {
// Serialize the edit stream
let edits = {
let mut edits = Vec::new();
lock.rebuild(&mut edits).unwrap();
let mut edits = Vec::<DomEdit>::new();
// lock.rebuild(&mut edits).unwrap();
serde_json::to_value(edits).unwrap()
};
@@ -139,8 +139,8 @@ impl<T: Properties + 'static> WebviewRenderer<T> {
// Serialize the edit stream
let edits = {
let mut edits = Vec::new();
lock.rebuild(&mut edits).unwrap();
let mut edits = Vec::<DomEdit>::new();
// lock.rebuild(&mut edits).unwrap();
serde_json::to_value(edits).unwrap()
};