feat: overhaul examples and clean things up
This commit is contained in:
1 parent
601632fc7e
commit
420a30e5d4
33 files changed
+1089
-1417
No files matched your search
@@ -55,13 +55,13 @@ impl WebsysDom {
|
||||
// re-hydrate the page - only supports one virtualdom per page
|
||||
if cfg.hydrate {
|
||||
// Load all the elements into the arena
|
||||
let node_list: NodeList = document.query_selector_all("dio_el").unwrap();
|
||||
let node_list: NodeList = document.query_selector_all("dioxus-id").unwrap();
|
||||
let len = node_list.length() as usize;
|
||||
|
||||
for x in 0..len {
|
||||
let node: Node = node_list.get(x as u32).unwrap();
|
||||
let el: &Element = node.dyn_ref::<Element>().unwrap();
|
||||
let id: String = el.get_attribute("dio_el").unwrap();
|
||||
let id: String = el.get_attribute("dioxus-id").unwrap();
|
||||
let id = id.parse::<usize>().unwrap();
|
||||
nodes[id] = Some(node);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user