fix: add ns param for removeAttribute

This commit is contained in:
Shuanghui Yan committed 2022-02-22 23:14:11 +08:00
1 parent d19ae3ff56
commit 4eeb3da8c9
4 files changed
+23 -11

No files matched your search

+12 -2
View File
@@ -107,6 +107,7 @@ pub enum DomEdit<'bump> {
RemoveAttribute {
root: u64,
name: &'static str,
ns: Option<&'bump str>,
},
}
@@ -218,8 +219,17 @@ impl<'a> Mutations<'a> {
}
pub(crate) fn remove_attribute(&mut self, attribute: &Attribute, root: u64) {
let name = attribute.name;
self.edits.push(RemoveAttribute { name, root });
let Attribute {
name,
namespace,
..
} = attribute;
self.edits.push(RemoveAttribute {
name,
ns: *namespace,
root
});
}
pub(crate) fn mark_dirty_scope(&mut self, scope: ScopeId) {