|
@@ -185,6 +185,9 @@ pub enum DomEdit<'bump> {
|
|
|
/// The namespace of the attribute.
|
|
|
ns: Option<&'bump str>,
|
|
|
},
|
|
|
+
|
|
|
+ /// Manually pop a root node from the stack.
|
|
|
+ PopRoot {},
|
|
|
}
|
|
|
|
|
|
use fxhash::FxHashSet;
|
|
@@ -205,6 +208,11 @@ impl<'a> Mutations<'a> {
|
|
|
self.edits.push(PushRoot { root: id });
|
|
|
}
|
|
|
|
|
|
+ // Navigation
|
|
|
+ pub(crate) fn pop_root(&mut self) {
|
|
|
+ self.edits.push(PopRoot {});
|
|
|
+ }
|
|
|
+
|
|
|
pub(crate) fn replace_with(&mut self, root: ElementId, m: u32) {
|
|
|
let root = root.as_u64();
|
|
|
self.edits.push(ReplaceWith { m, root });
|