mirror of
https://github.com/servo/servo.git
synced 2025-10-07 12:09:23 +01:00
Stop mutating Element::namespace.
This commit is contained in:
parent
6df6a7d512
commit
d230077f9f
3 changed files with 22 additions and 17 deletions
|
@ -430,7 +430,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
|||
return Err(InvalidCharacter);
|
||||
}
|
||||
let local_name = local_name.as_slice().to_ascii_lower();
|
||||
Ok(build_element_from_tag(local_name, self))
|
||||
Ok(build_element_from_tag(local_name, namespace::HTML, self))
|
||||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#dom-document-createelementns
|
||||
|
@ -473,7 +473,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
|||
}
|
||||
|
||||
if ns == namespace::HTML {
|
||||
Ok(build_element_from_tag(local_name_from_qname, self))
|
||||
Ok(build_element_from_tag(local_name_from_qname, ns, self))
|
||||
} else {
|
||||
Ok(Element::new(local_name_from_qname, ns, prefix_from_qname, self))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue