mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Make Attr::SetValue to reflect attribute change.
This commit is contained in:
parent
a74397432e
commit
b2fa6fa221
3 changed files with 36 additions and 15 deletions
|
@ -1365,6 +1365,10 @@ impl Node {
|
|||
let node_elem: JS<Element> = ElementCast::to(node).unwrap();
|
||||
let node_elem = node_elem.get();
|
||||
let mut copy_elem: JS<Element> = ElementCast::to(©).unwrap();
|
||||
|
||||
// XXX: to avoid double borrowing compile error. we might be able to fix this after #1854
|
||||
let copy_elem_alias: JS<Element> = copy_elem.clone();
|
||||
|
||||
let copy_elem = copy_elem.get_mut();
|
||||
// FIXME: https://github.com/mozilla/servo/issues/1737
|
||||
copy_elem.namespace = node_elem.namespace.clone();
|
||||
|
@ -1373,7 +1377,7 @@ impl Node {
|
|||
copy_elem.attrs.push(Attr::new(&document.get().window,
|
||||
attr.local_name.clone(), attr.value.clone(),
|
||||
attr.name.clone(), attr.namespace.clone(),
|
||||
attr.prefix.clone()));
|
||||
attr.prefix.clone(), copy_elem_alias.clone()));
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue