mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Take the prefix from createElementNS into account for HTML elements
Fixes #3139
This commit is contained in:
parent
0549ed3c67
commit
3a5a66d54e
73 changed files with 405 additions and 477 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue