examples: webview and async
This commit is contained in:
1 parent
99d94b69ab
commit
eb82051000
13 files changed
+355
-57
No files matched your search
@@ -9,17 +9,32 @@ use dioxus_core::{
|
||||
};
|
||||
use DomEdit::*;
|
||||
|
||||
pub struct WebviewRegistry {}
|
||||
|
||||
impl WebviewRegistry {
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WebviewDom<'bump> {
|
||||
pub edits: Vec<DomEdit<'bump>>,
|
||||
pub node_counter: u64,
|
||||
pub registry: WebviewRegistry,
|
||||
}
|
||||
impl WebviewDom<'_> {
|
||||
pub fn new() -> Self {
|
||||
pub fn new(registry: WebviewRegistry) -> Self {
|
||||
Self {
|
||||
edits: Vec::new(),
|
||||
node_counter: 0,
|
||||
registry,
|
||||
}
|
||||
}
|
||||
|
||||
// Finish using the dom (for its edit list) and give back the node and event registry
|
||||
pub fn consume(self) -> WebviewRegistry {
|
||||
self.registry
|
||||
}
|
||||
}
|
||||
impl<'bump> RealDom<'bump> for WebviewDom<'bump> {
|
||||
fn push_root(&mut self, root: dioxus_core::virtual_dom::RealDomNode) {
|
||||
|
||||
Reference in new issue
Block a user