Add back ondestroy hook

This commit is contained in:
Jonathan Kelley committed 2024-01-15 14:27:20 -08:00
1 parent 6134a2ce24
commit bb6aa9e792
8 files changed
+121 -146

No files matched your search

+13
View File
@@ -867,6 +867,11 @@ impl IntoVNode for VNode {
self
}
}
impl IntoVNode for &VNode {
fn into_vnode(self) -> VNode {
self.clone()
}
}
impl IntoVNode for Element {
fn into_vnode(self) -> VNode {
match self {
@@ -875,6 +880,14 @@ impl IntoVNode for Element {
}
}
}
impl IntoVNode for &Element {
fn into_vnode(self) -> VNode {
match self {
Some(val) => val.into_vnode(),
_ => VNode::empty().unwrap(),
}
}
}
// Note that we're using the E as a generic but this is never crafted anyways.
pub struct FromNodeIterator;