mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove the manual Element::new call from Document::CreateElementNS.
This commit is contained in:
parent
a5e9f97c8f
commit
f565e203e4
1 changed files with 3 additions and 8 deletions
|
@ -571,14 +571,9 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
|||
_ => {}
|
||||
}
|
||||
|
||||
if ns == ns!(HTML) {
|
||||
let name = QualName::new(ns!(HTML), Atom::from_slice(local_name_from_qname));
|
||||
Ok(Element::create(name, prefix_from_qname.map(|s| s.to_string()), self,
|
||||
ScriptCreated))
|
||||
} else {
|
||||
Ok(Element::new(local_name_from_qname.to_string(), ns,
|
||||
prefix_from_qname.map(|s| s.to_string()), self))
|
||||
}
|
||||
let name = QualName::new(ns, Atom::from_slice(local_name_from_qname));
|
||||
Ok(Element::create(name, prefix_from_qname.map(|s| s.to_string()), self,
|
||||
ScriptCreated))
|
||||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#dom-document-createdocumentfragment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue