move creation functions into the structs they are creating and unify user and system events

This commit is contained in:
Evan Almloff committed 2024-01-05 13:18:48 -06:00
1 parent a4a9aa5224
commit d90c71c508
8 files changed
+110 -319

No files matched your search

+1 -4
View File
@@ -21,9 +21,6 @@ pub struct ElementRef {
// the pathway of the real element inside the template
pub(crate) path: ElementPath,
// the scope that this element belongs to
pub(crate) scope: ScopeId,
// The actual element
pub(crate) element: VNode,
}
@@ -59,7 +56,7 @@ impl VirtualDom {
// Note: This will not remove any ids from the arena
pub(crate) fn drop_scope(&mut self, id: ScopeId) {
self.dirty_scopes.remove(&DirtyScope {
height: self.scopes[id.0].height(),
height: self.scopes[id.0].context().height,
id,
});