diff options
author | Gilles Leblanc <gilles.leblanc@gmail.com> | 2014-10-06 22:49:49 -0400 |
---|---|---|
committer | Gilles Leblanc <gilles.leblanc@gmail.com> | 2014-10-06 22:49:49 -0400 |
commit | 3a5a66d54e459deb9ead7f8b8760449e9e5faa94 (patch) | |
tree | 04e8f2ae33f499e990727b1a841559a203e79fa9 /components/script/dom/htmlelement.rs | |
parent | 0549ed3c675d1cc7a8832128e90b7886e3c1710c (diff) | |
download | servo-3a5a66d54e459deb9ead7f8b8760449e9e5faa94.tar.gz servo-3a5a66d54e459deb9ead7f8b8760449e9e5faa94.zip |
Take the prefix from createElementNS into account for HTML elements
Fixes #3139
Diffstat (limited to 'components/script/dom/htmlelement.rs')
-rw-r--r-- | components/script/dom/htmlelement.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs index 96c3af3a8fd..c1489fa02ad 100644 --- a/components/script/dom/htmlelement.rs +++ b/components/script/dom/htmlelement.rs @@ -37,15 +37,15 @@ impl HTMLElementDerived for EventTarget { } impl HTMLElement { - pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: JSRef<Document>) -> HTMLElement { + pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLElement { HTMLElement { - element: Element::new_inherited(type_id, tag_name, ns!(HTML), None, document) + element: Element::new_inherited(type_id, tag_name, ns!(HTML), prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLElement> { - let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, document); + pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLElement> { + let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, prefix, document); Node::reflect_node(box element, document, HTMLElementBinding::Wrap) } } |