chore: more refactoring, docs

This commit is contained in:
Jonathan Kelley committed 2022-11-11 18:29:27 -08:00
1 parent f7df6a9893
commit c44bd11fe5
27 files changed
+657 -382

No files matched your search

+9
View File
@@ -8,6 +8,15 @@ pub struct ElementPath {
pub element: usize,
}
impl ElementPath {
pub fn null() -> Self {
Self {
template: std::ptr::null_mut(),
element: 0,
}
}
}
impl VirtualDom {
pub fn next_element(&mut self, template: &VNode) -> ElementId {
let entry = self.elements.vacant_entry();