chore: more refactoring, docs
This commit is contained in:
1 parent
f7df6a9893
commit
c44bd11fe5
27 files changed
+657
-382
No files matched your search
@@ -1,16 +1,22 @@
|
||||
use crate::{nodes::VNode, scopes::ScopeId, virtual_dom::VirtualDom, DynamicNode};
|
||||
use crate::{nodes::VNode, scopes::ScopeId, virtual_dom::VirtualDom, DynamicNode, Mutations};
|
||||
|
||||
impl VirtualDom {
|
||||
impl<'b> VirtualDom {
|
||||
pub fn drop_scope(&mut self, id: ScopeId) {
|
||||
let scope = self.scopes.get(id.0).unwrap();
|
||||
// let scope = self.scopes.get(id.0).unwrap();
|
||||
|
||||
let root = scope.root_node();
|
||||
let root = unsafe { std::mem::transmute(root) };
|
||||
// let root = scope.root_node();
|
||||
// let root = unsafe { std::mem::transmute(root) };
|
||||
|
||||
self.drop_template(root);
|
||||
// self.drop_template(root, false);
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn drop_template<'a>(&'a mut self, template: &'a VNode<'a>) {
|
||||
pub fn drop_template(
|
||||
&mut self,
|
||||
mutations: &mut Mutations,
|
||||
template: &'b VNode<'b>,
|
||||
gen_roots: bool,
|
||||
) {
|
||||
for node in template.dynamic_nodes.iter() {
|
||||
match node {
|
||||
DynamicNode::Text { id, .. } => {}
|
||||
|
||||
Reference in new issue
Block a user