Take the prefix from createElementNS into account for HTML elements

Fixes #3139
This commit is contained in:
Gilles Leblanc 2014-10-06 22:49:49 -04:00
parent 0549ed3c67
commit 3a5a66d54e
73 changed files with 405 additions and 477 deletions

View file

@ -486,7 +486,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, ns!(HTML), self))
Ok(build_element_from_tag(local_name, ns!(HTML), None, self))
}
// http://dom.spec.whatwg.org/#dom-document-createelementns
@ -530,7 +530,8 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
}
if ns == ns!(HTML) {
Ok(build_element_from_tag(local_name_from_qname.to_string(), ns, self))
Ok(build_element_from_tag(local_name_from_qname.to_string(), ns,
prefix_from_qname.map(|s| s.to_string()), self))
} else {
Ok(Element::new(local_name_from_qname.to_string(), ns,
prefix_from_qname.map(|s| s.to_string()), self))
@ -679,7 +680,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
}
},
None => {
let new_title = HTMLTitleElement::new("title".to_string(), self).root();
let new_title = HTMLTitleElement::new("title".to_string(), None, self).root();
let new_title: JSRef<Node> = NodeCast::from_ref(*new_title);
if !title.is_empty() {

View file

@ -131,13 +131,13 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
{
// Step 4.
let doc_html: Root<Node> = NodeCast::from_temporary(HTMLHtmlElement::new("html".to_string(), *doc)).root();
let doc_html: Root<Node> = NodeCast::from_temporary(HTMLHtmlElement::new("html".to_string(), None, *doc)).root();
let doc_html = doc_html.deref();
assert!(doc_node.AppendChild(*doc_html).is_ok());
{
// Step 5.
let doc_head: Root<Node> = NodeCast::from_temporary(HTMLHeadElement::new("head".to_string(), *doc)).root();
let doc_head: Root<Node> = NodeCast::from_temporary(HTMLHeadElement::new("head".to_string(), None, *doc)).root();
let doc_head = doc_head.deref();
assert!(doc_html.AppendChild(*doc_head).is_ok());
@ -146,7 +146,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
None => (),
Some(title_str) => {
// Step 6.1.
let doc_title: Root<Node> = NodeCast::from_temporary(HTMLTitleElement::new("title".to_string(), *doc)).root();
let doc_title: Root<Node> = NodeCast::from_temporary(HTMLTitleElement::new("title".to_string(), None, *doc)).root();
let doc_title = doc_title.deref();
assert!(doc_head.AppendChild(*doc_title).is_ok());
@ -159,7 +159,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
}
// Step 7.
let doc_body: Root<HTMLBodyElement> = HTMLBodyElement::new("body".to_string(), *doc).root();
let doc_body: Root<HTMLBodyElement> = HTMLBodyElement::new("body".to_string(), None, *doc).root();
let doc_body = doc_body.deref();
assert!(doc_html.AppendChild(NodeCast::from_ref(*doc_body)).is_ok());
}

View file

@ -34,15 +34,15 @@ impl HTMLAnchorElementDerived for EventTarget {
}
impl HTMLAnchorElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLAnchorElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLAnchorElement {
HTMLAnchorElement {
htmlelement: HTMLElement::new_inherited(HTMLAnchorElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLAnchorElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLAnchorElement> {
let element = HTMLAnchorElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLAnchorElement> {
let element = HTMLAnchorElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLAnchorElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLAppletElementDerived for EventTarget {
}
impl HTMLAppletElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLAppletElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLAppletElement {
HTMLAppletElement {
htmlelement: HTMLElement::new_inherited(HTMLAppletElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLAppletElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLAppletElement> {
let element = HTMLAppletElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLAppletElement> {
let element = HTMLAppletElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLAppletElementBinding::Wrap)
}
}

View file

@ -27,15 +27,15 @@ impl HTMLAreaElementDerived for EventTarget {
}
impl HTMLAreaElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLAreaElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLAreaElement {
HTMLAreaElement {
htmlelement: HTMLElement::new_inherited(HTMLAreaElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLAreaElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLAreaElement> {
let element = HTMLAreaElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLAreaElement> {
let element = HTMLAreaElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLAreaElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLAudioElementDerived for EventTarget {
}
impl HTMLAudioElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLAudioElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLAudioElement {
HTMLAudioElement {
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLAudioElementTypeId, localName, document)
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLAudioElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLAudioElement> {
let element = HTMLAudioElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLAudioElement> {
let element = HTMLAudioElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLAudioElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLBaseElementDerived for EventTarget {
}
impl HTMLBaseElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLBaseElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLBaseElement {
HTMLBaseElement {
htmlelement: HTMLElement::new_inherited(HTMLBaseElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLBaseElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLBaseElement> {
let element = HTMLBaseElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLBaseElement> {
let element = HTMLBaseElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLBaseElementBinding::Wrap)
}
}

View file

@ -33,15 +33,15 @@ impl HTMLBodyElementDerived for EventTarget {
}
impl HTMLBodyElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLBodyElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLBodyElement {
HTMLBodyElement {
htmlelement: HTMLElement::new_inherited(HTMLBodyElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLBodyElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLBodyElement> {
let element = HTMLBodyElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLBodyElement> {
let element = HTMLBodyElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLBodyElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLBRElementDerived for EventTarget {
}
impl HTMLBRElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLBRElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLBRElement {
HTMLBRElement {
htmlelement: HTMLElement::new_inherited(HTMLBRElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLBRElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLBRElement> {
let element = HTMLBRElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLBRElement> {
let element = HTMLBRElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLBRElementBinding::Wrap)
}
}

View file

@ -32,15 +32,15 @@ impl HTMLButtonElementDerived for EventTarget {
}
impl HTMLButtonElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLButtonElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLButtonElement {
HTMLButtonElement {
htmlelement: HTMLElement::new_inherited(HTMLButtonElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLButtonElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLButtonElement> {
let element = HTMLButtonElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLButtonElement> {
let element = HTMLButtonElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLButtonElementBinding::Wrap)
}
}

View file

@ -44,9 +44,9 @@ impl HTMLCanvasElementDerived for EventTarget {
}
impl HTMLCanvasElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLCanvasElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLCanvasElement {
HTMLCanvasElement {
htmlelement: HTMLElement::new_inherited(HTMLCanvasElementTypeId, localName, document),
htmlelement: HTMLElement::new_inherited(HTMLCanvasElementTypeId, localName, prefix, document),
context: Default::default(),
width: Cell::new(DefaultWidth),
height: Cell::new(DefaultHeight),
@ -54,8 +54,8 @@ impl HTMLCanvasElement {
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLCanvasElement> {
let element = HTMLCanvasElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLCanvasElement> {
let element = HTMLCanvasElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLCanvasElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLDataElementDerived for EventTarget {
}
impl HTMLDataElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDataElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDataElement {
HTMLDataElement {
htmlelement: HTMLElement::new_inherited(HTMLDataElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLDataElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDataElement> {
let element = HTMLDataElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDataElement> {
let element = HTMLDataElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLDataElementBinding::Wrap)
}
}

View file

@ -29,15 +29,15 @@ impl HTMLDataListElementDerived for EventTarget {
}
impl HTMLDataListElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDataListElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDataListElement {
HTMLDataListElement {
htmlelement: HTMLElement::new_inherited(HTMLDataListElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLDataListElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDataListElement> {
let element = HTMLDataListElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDataListElement> {
let element = HTMLDataListElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLDataListElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLDirectoryElementDerived for EventTarget {
}
impl HTMLDirectoryElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDirectoryElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDirectoryElement {
HTMLDirectoryElement {
htmlelement: HTMLElement::new_inherited(HTMLDirectoryElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLDirectoryElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDirectoryElement> {
let element = HTMLDirectoryElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDirectoryElement> {
let element = HTMLDirectoryElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLDirectoryElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLDivElementDerived for EventTarget {
}
impl HTMLDivElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDivElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDivElement {
HTMLDivElement {
htmlelement: HTMLElement::new_inherited(HTMLDivElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLDivElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDivElement> {
let element = HTMLDivElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDivElement> {
let element = HTMLDivElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLDListElementDerived for EventTarget {
}
impl HTMLDListElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDListElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDListElement {
HTMLDListElement {
htmlelement: HTMLElement::new_inherited(HTMLDListElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLDListElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDListElement> {
let element = HTMLDListElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDListElement> {
let element = HTMLDListElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLDListElementBinding::Wrap)
}
}

View file

@ -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)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLEmbedElementDerived for EventTarget {
}
impl HTMLEmbedElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLEmbedElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLEmbedElement {
HTMLEmbedElement {
htmlelement: HTMLElement::new_inherited(HTMLEmbedElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLEmbedElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLEmbedElement> {
let element = HTMLEmbedElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLEmbedElement> {
let element = HTMLEmbedElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLEmbedElementBinding::Wrap)
}
}

View file

@ -34,15 +34,15 @@ impl HTMLFieldSetElementDerived for EventTarget {
}
impl HTMLFieldSetElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFieldSetElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFieldSetElement {
HTMLFieldSetElement {
htmlelement: HTMLElement::new_inherited(HTMLFieldSetElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLFieldSetElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFieldSetElement> {
let element = HTMLFieldSetElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFieldSetElement> {
let element = HTMLFieldSetElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLFieldSetElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLFontElementDerived for EventTarget {
}
impl HTMLFontElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFontElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFontElement {
HTMLFontElement {
htmlelement: HTMLElement::new_inherited(HTMLFontElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLFontElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFontElement> {
let element = HTMLFontElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFontElement> {
let element = HTMLFontElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLFontElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLFormElementDerived for EventTarget {
}
impl HTMLFormElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFormElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFormElement {
HTMLFormElement {
htmlelement: HTMLElement::new_inherited(HTMLFormElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLFormElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFormElement> {
let element = HTMLFormElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFormElement> {
let element = HTMLFormElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLFormElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLFrameElementDerived for EventTarget {
}
impl HTMLFrameElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFrameElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFrameElement {
HTMLFrameElement {
htmlelement: HTMLElement::new_inherited(HTMLFrameElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLFrameElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFrameElement> {
let element = HTMLFrameElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFrameElement> {
let element = HTMLFrameElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLFrameElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLFrameSetElementDerived for EventTarget {
}
impl HTMLFrameSetElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFrameSetElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFrameSetElement {
HTMLFrameSetElement {
htmlelement: HTMLElement::new_inherited(HTMLFrameSetElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLFrameSetElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFrameSetElement> {
let element = HTMLFrameSetElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFrameSetElement> {
let element = HTMLFrameSetElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLFrameSetElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLHeadElementDerived for EventTarget {
}
impl HTMLHeadElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLHeadElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLHeadElement {
HTMLHeadElement {
htmlelement: HTMLElement::new_inherited(HTMLHeadElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLHeadElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLHeadElement> {
let element = HTMLHeadElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLHeadElement> {
let element = HTMLHeadElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLHeadElementBinding::Wrap)
}
}

View file

@ -37,16 +37,16 @@ impl HTMLHeadingElementDerived for EventTarget {
}
impl HTMLHeadingElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>, level: HeadingLevel) -> HTMLHeadingElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>, level: HeadingLevel) -> HTMLHeadingElement {
HTMLHeadingElement {
htmlelement: HTMLElement::new_inherited(HTMLHeadingElementTypeId, localName, document),
htmlelement: HTMLElement::new_inherited(HTMLHeadingElementTypeId, localName, prefix, document),
level: level,
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>, level: HeadingLevel) -> Temporary<HTMLHeadingElement> {
let element = HTMLHeadingElement::new_inherited(localName, document, level);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>, level: HeadingLevel) -> Temporary<HTMLHeadingElement> {
let element = HTMLHeadingElement::new_inherited(localName, prefix, document, level);
Node::reflect_node(box element, document, HTMLHeadingElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLHRElementDerived for EventTarget {
}
impl HTMLHRElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLHRElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLHRElement {
HTMLHRElement {
htmlelement: HTMLElement::new_inherited(HTMLHRElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLHRElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLHRElement> {
let element = HTMLHRElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLHRElement> {
let element = HTMLHRElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLHRElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLHtmlElementDerived for EventTarget {
}
impl HTMLHtmlElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLHtmlElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLHtmlElement {
HTMLHtmlElement {
htmlelement: HTMLElement::new_inherited(HTMLHtmlElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLHtmlElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLHtmlElement> {
let element = HTMLHtmlElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLHtmlElement> {
let element = HTMLHtmlElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLHtmlElementBinding::Wrap)
}
}

View file

@ -113,17 +113,17 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
}
impl HTMLIFrameElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLIFrameElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLIFrameElement {
HTMLIFrameElement {
htmlelement: HTMLElement::new_inherited(HTMLIFrameElementTypeId, localName, document),
htmlelement: HTMLElement::new_inherited(HTMLIFrameElementTypeId, localName, prefix, document),
size: Cell::new(None),
sandbox: Cell::new(None),
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLIFrameElement> {
let element = HTMLIFrameElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLIFrameElement> {
let element = HTMLIFrameElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap)
}
}

View file

@ -71,16 +71,16 @@ impl<'a> PrivateHTMLImageElementHelpers for JSRef<'a, HTMLImageElement> {
}
impl HTMLImageElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLImageElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLImageElement {
HTMLImageElement {
htmlelement: HTMLElement::new_inherited(HTMLImageElementTypeId, localName, document),
htmlelement: HTMLElement::new_inherited(HTMLImageElementTypeId, localName, prefix, document),
image: RefCell::new(None),
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLImageElement> {
let element = HTMLImageElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLImageElement> {
let element = HTMLImageElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLImageElementBinding::Wrap)
}
}

View file

@ -62,9 +62,9 @@ impl HTMLInputElementDerived for EventTarget {
static DEFAULT_INPUT_SIZE: u32 = 20;
impl HTMLInputElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLInputElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLInputElement {
HTMLInputElement {
htmlelement: HTMLElement::new_inherited(HTMLInputElementTypeId, localName, document),
htmlelement: HTMLElement::new_inherited(HTMLInputElementTypeId, localName, prefix, document),
input_type: Cell::new(InputText),
checked: Cell::new(false),
uncommitted_value: RefCell::new(None),
@ -74,8 +74,8 @@ impl HTMLInputElement {
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLInputElement> {
let element = HTMLInputElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLInputElement> {
let element = HTMLInputElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLInputElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLLabelElementDerived for EventTarget {
}
impl HTMLLabelElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLLabelElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLLabelElement {
HTMLLabelElement {
htmlelement: HTMLElement::new_inherited(HTMLLabelElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLLabelElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLLabelElement> {
let element = HTMLLabelElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLLabelElement> {
let element = HTMLLabelElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLLabelElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLLegendElementDerived for EventTarget {
}
impl HTMLLegendElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLLegendElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLLegendElement {
HTMLLegendElement {
htmlelement: HTMLElement::new_inherited(HTMLLegendElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLLegendElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLLegendElement> {
let element = HTMLLegendElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLLegendElement> {
let element = HTMLLegendElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLLegendElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLLIElementDerived for EventTarget {
}
impl HTMLLIElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLLIElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLLIElement {
HTMLLIElement {
htmlelement: HTMLElement::new_inherited(HTMLLIElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLLIElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLLIElement> {
let element = HTMLLIElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLLIElement> {
let element = HTMLLIElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLLIElementBinding::Wrap)
}
}

View file

@ -34,15 +34,15 @@ impl HTMLLinkElementDerived for EventTarget {
}
impl HTMLLinkElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLLinkElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLLinkElement {
HTMLLinkElement {
htmlelement: HTMLElement::new_inherited(HTMLLinkElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLLinkElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLLinkElement> {
let element = HTMLLinkElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLLinkElement> {
let element = HTMLLinkElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLLinkElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLMapElementDerived for EventTarget {
}
impl HTMLMapElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLMapElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMapElement {
HTMLMapElement {
htmlelement: HTMLElement::new_inherited(HTMLMapElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLMapElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLMapElement> {
let element = HTMLMapElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLMapElement> {
let element = HTMLMapElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLMapElementBinding::Wrap)
}
}

View file

@ -29,9 +29,9 @@ impl HTMLMediaElementDerived for EventTarget {
}
impl HTMLMediaElement {
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: JSRef<Document>) -> HTMLMediaElement {
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMediaElement {
HTMLMediaElement {
htmlelement: HTMLElement::new_inherited(type_id, tag_name, document)
htmlelement: HTMLElement::new_inherited(type_id, tag_name, prefix, document)
}
}
}

View file

@ -26,15 +26,15 @@ impl HTMLMetaElementDerived for EventTarget {
}
impl HTMLMetaElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLMetaElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMetaElement {
HTMLMetaElement {
htmlelement: HTMLElement::new_inherited(HTMLMetaElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLMetaElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLMetaElement> {
let element = HTMLMetaElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLMetaElement> {
let element = HTMLMetaElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLMetaElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLMeterElementDerived for EventTarget {
}
impl HTMLMeterElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLMeterElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMeterElement {
HTMLMeterElement {
htmlelement: HTMLElement::new_inherited(HTMLMeterElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLMeterElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLMeterElement> {
let element = HTMLMeterElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLMeterElement> {
let element = HTMLMeterElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLMeterElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLModElementDerived for EventTarget {
}
impl HTMLModElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLModElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLModElement {
HTMLModElement {
htmlelement: HTMLElement::new_inherited(HTMLModElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLModElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLModElement> {
let element = HTMLModElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLModElement> {
let element = HTMLModElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLModElementBinding::Wrap)
}
}

View file

@ -38,15 +38,15 @@ impl HTMLObjectElementDerived for EventTarget {
}
impl HTMLObjectElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLObjectElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLObjectElement {
HTMLObjectElement {
htmlelement: HTMLElement::new_inherited(HTMLObjectElementTypeId, localName, document),
htmlelement: HTMLElement::new_inherited(HTMLObjectElementTypeId, localName, prefix, document),
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLObjectElement> {
let element = HTMLObjectElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLObjectElement> {
let element = HTMLObjectElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLObjectElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLOListElementDerived for EventTarget {
}
impl HTMLOListElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLOListElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLOListElement {
HTMLOListElement {
htmlelement: HTMLElement::new_inherited(HTMLOListElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLOListElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLOListElement> {
let element = HTMLOListElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLOListElement> {
let element = HTMLOListElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLOListElementBinding::Wrap)
}
}

View file

@ -31,15 +31,15 @@ impl HTMLOptGroupElementDerived for EventTarget {
}
impl HTMLOptGroupElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLOptGroupElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLOptGroupElement {
HTMLOptGroupElement {
htmlelement: HTMLElement::new_inherited(HTMLOptGroupElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLOptGroupElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLOptGroupElement> {
let element = HTMLOptGroupElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLOptGroupElement> {
let element = HTMLOptGroupElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLOptGroupElementBinding::Wrap)
}
}

View file

@ -35,15 +35,15 @@ impl HTMLOptionElementDerived for EventTarget {
}
impl HTMLOptionElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLOptionElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLOptionElement {
HTMLOptionElement {
htmlelement: HTMLElement::new_inherited(HTMLOptionElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLOptionElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLOptionElement> {
let element = HTMLOptionElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLOptionElement> {
let element = HTMLOptionElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLOptionElementBinding::Wrap)
}
}

View file

@ -28,15 +28,15 @@ impl HTMLOutputElementDerived for EventTarget {
}
impl HTMLOutputElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLOutputElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLOutputElement {
HTMLOutputElement {
htmlelement: HTMLElement::new_inherited(HTMLOutputElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLOutputElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLOutputElement> {
let element = HTMLOutputElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLOutputElement> {
let element = HTMLOutputElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLOutputElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLParagraphElementDerived for EventTarget {
}
impl HTMLParagraphElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLParagraphElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLParagraphElement {
HTMLParagraphElement {
htmlelement: HTMLElement::new_inherited(HTMLParagraphElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLParagraphElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLParagraphElement> {
let element = HTMLParagraphElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLParagraphElement> {
let element = HTMLParagraphElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLParagraphElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLParamElementDerived for EventTarget {
}
impl HTMLParamElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLParamElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLParamElement {
HTMLParamElement {
htmlelement: HTMLElement::new_inherited(HTMLParamElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLParamElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLParamElement> {
let element = HTMLParamElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLParamElement> {
let element = HTMLParamElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLParamElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLPreElementDerived for EventTarget {
}
impl HTMLPreElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLPreElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLPreElement {
HTMLPreElement {
htmlelement: HTMLElement::new_inherited(HTMLPreElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLPreElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLPreElement> {
let element = HTMLPreElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLPreElement> {
let element = HTMLPreElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLPreElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLProgressElementDerived for EventTarget {
}
impl HTMLProgressElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLProgressElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLProgressElement {
HTMLProgressElement {
htmlelement: HTMLElement::new_inherited(HTMLProgressElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLProgressElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLProgressElement> {
let element = HTMLProgressElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLProgressElement> {
let element = HTMLProgressElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLProgressElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLQuoteElementDerived for EventTarget {
}
impl HTMLQuoteElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLQuoteElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLQuoteElement {
HTMLQuoteElement {
htmlelement: HTMLElement::new_inherited(HTMLQuoteElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLQuoteElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLQuoteElement> {
let element = HTMLQuoteElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLQuoteElement> {
let element = HTMLQuoteElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLQuoteElementBinding::Wrap)
}
}

View file

@ -31,15 +31,15 @@ impl HTMLScriptElementDerived for EventTarget {
}
impl HTMLScriptElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLScriptElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLScriptElement {
HTMLScriptElement {
htmlelement: HTMLElement::new_inherited(HTMLScriptElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLScriptElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLScriptElement> {
let element = HTMLScriptElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLScriptElement> {
let element = HTMLScriptElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLScriptElementBinding::Wrap)
}
}

View file

@ -34,15 +34,15 @@ impl HTMLSelectElementDerived for EventTarget {
}
impl HTMLSelectElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLSelectElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLSelectElement {
HTMLSelectElement {
htmlelement: HTMLElement::new_inherited(HTMLSelectElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLSelectElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLSelectElement> {
let element = HTMLSelectElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLSelectElement> {
let element = HTMLSelectElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLSelectElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLSourceElementDerived for EventTarget {
}
impl HTMLSourceElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLSourceElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLSourceElement {
HTMLSourceElement {
htmlelement: HTMLElement::new_inherited(HTMLSourceElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLSourceElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLSourceElement> {
let element = HTMLSourceElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLSourceElement> {
let element = HTMLSourceElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLSourceElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLSpanElementDerived for EventTarget {
}
impl HTMLSpanElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLSpanElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLSpanElement {
HTMLSpanElement {
htmlelement: HTMLElement::new_inherited(HTMLSpanElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLSpanElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLSpanElement> {
let element = HTMLSpanElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLSpanElement> {
let element = HTMLSpanElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLSpanElementBinding::Wrap)
}
}

View file

@ -30,15 +30,15 @@ impl HTMLStyleElementDerived for EventTarget {
}
impl HTMLStyleElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLStyleElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLStyleElement {
HTMLStyleElement {
htmlelement: HTMLElement::new_inherited(HTMLStyleElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLStyleElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLStyleElement> {
let element = HTMLStyleElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLStyleElement> {
let element = HTMLStyleElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLStyleElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLTableCaptionElementDerived for EventTarget {
}
impl HTMLTableCaptionElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableCaptionElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableCaptionElement {
HTMLTableCaptionElement {
htmlelement: HTMLElement::new_inherited(HTMLTableCaptionElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTableCaptionElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableCaptionElement> {
let element = HTMLTableCaptionElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableCaptionElement> {
let element = HTMLTableCaptionElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTableCaptionElementBinding::Wrap)
}
}

View file

@ -29,9 +29,9 @@ impl HTMLTableCellElementDerived for EventTarget {
}
impl HTMLTableCellElement {
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: JSRef<Document>) -> HTMLTableCellElement {
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableCellElement {
HTMLTableCellElement {
htmlelement: HTMLElement::new_inherited(type_id, tag_name, document)
htmlelement: HTMLElement::new_inherited(type_id, tag_name, prefix, document)
}
}
}

View file

@ -26,15 +26,15 @@ impl HTMLTableColElementDerived for EventTarget {
}
impl HTMLTableColElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableColElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableColElement {
HTMLTableColElement {
htmlelement: HTMLElement::new_inherited(HTMLTableColElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTableColElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableColElement> {
let element = HTMLTableColElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableColElement> {
let element = HTMLTableColElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTableColElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLTableDataCellElementDerived for EventTarget {
}
impl HTMLTableDataCellElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableDataCellElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableDataCellElement {
HTMLTableDataCellElement {
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableDataCellElementTypeId, localName, document)
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableDataCellElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableDataCellElement> {
let element = HTMLTableDataCellElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableDataCellElement> {
let element = HTMLTableDataCellElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTableDataCellElementBinding::Wrap)
}
}

View file

@ -30,15 +30,15 @@ impl HTMLTableElementDerived for EventTarget {
}
impl HTMLTableElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableElement {
HTMLTableElement {
htmlelement: HTMLElement::new_inherited(HTMLTableElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTableElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableElement> {
let element = HTMLTableElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableElement> {
let element = HTMLTableElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTableElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLTableHeaderCellElementDerived for EventTarget {
}
impl HTMLTableHeaderCellElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableHeaderCellElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableHeaderCellElement {
HTMLTableHeaderCellElement {
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableHeaderCellElementTypeId, localName, document)
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableHeaderCellElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableHeaderCellElement> {
let element = HTMLTableHeaderCellElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableHeaderCellElement> {
let element = HTMLTableHeaderCellElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTableHeaderCellElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLTableRowElementDerived for EventTarget {
}
impl HTMLTableRowElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableRowElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableRowElement {
HTMLTableRowElement {
htmlelement: HTMLElement::new_inherited(HTMLTableRowElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTableRowElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableRowElement> {
let element = HTMLTableRowElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableRowElement> {
let element = HTMLTableRowElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTableRowElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLTableSectionElementDerived for EventTarget {
}
impl HTMLTableSectionElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableSectionElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableSectionElement {
HTMLTableSectionElement {
htmlelement: HTMLElement::new_inherited(HTMLTableSectionElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTableSectionElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableSectionElement> {
let element = HTMLTableSectionElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableSectionElement> {
let element = HTMLTableSectionElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTableSectionElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLTemplateElementDerived for EventTarget {
}
impl HTMLTemplateElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTemplateElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTemplateElement {
HTMLTemplateElement {
htmlelement: HTMLElement::new_inherited(HTMLTemplateElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTemplateElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTemplateElement> {
let element = HTMLTemplateElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTemplateElement> {
let element = HTMLTemplateElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTemplateElementBinding::Wrap)
}
}

View file

@ -31,15 +31,15 @@ impl HTMLTextAreaElementDerived for EventTarget {
}
impl HTMLTextAreaElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTextAreaElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTextAreaElement {
HTMLTextAreaElement {
htmlelement: HTMLElement::new_inherited(HTMLTextAreaElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTextAreaElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTextAreaElement> {
let element = HTMLTextAreaElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTextAreaElement> {
let element = HTMLTextAreaElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTextAreaElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLTimeElementDerived for EventTarget {
}
impl HTMLTimeElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTimeElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTimeElement {
HTMLTimeElement {
htmlelement: HTMLElement::new_inherited(HTMLTimeElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTimeElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTimeElement> {
let element = HTMLTimeElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTimeElement> {
let element = HTMLTimeElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTimeElementBinding::Wrap)
}
}

View file

@ -29,15 +29,15 @@ impl HTMLTitleElementDerived for EventTarget {
}
impl HTMLTitleElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTitleElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTitleElement {
HTMLTitleElement {
htmlelement: HTMLElement::new_inherited(HTMLTitleElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTitleElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTitleElement> {
let element = HTMLTitleElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTitleElement> {
let element = HTMLTitleElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTitleElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLTrackElementDerived for EventTarget {
}
impl HTMLTrackElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTrackElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTrackElement {
HTMLTrackElement {
htmlelement: HTMLElement::new_inherited(HTMLTrackElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLTrackElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTrackElement> {
let element = HTMLTrackElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTrackElement> {
let element = HTMLTrackElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLTrackElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLUListElementDerived for EventTarget {
}
impl HTMLUListElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLUListElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLUListElement {
HTMLUListElement {
htmlelement: HTMLElement::new_inherited(HTMLUListElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLUListElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLUListElement> {
let element = HTMLUListElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLUListElement> {
let element = HTMLUListElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLUListElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLUnknownElementDerived for EventTarget {
}
impl HTMLUnknownElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLUnknownElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLUnknownElement {
HTMLUnknownElement {
htmlelement: HTMLElement::new_inherited(HTMLUnknownElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLUnknownElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLUnknownElement> {
let element = HTMLUnknownElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLUnknownElement> {
let element = HTMLUnknownElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLUnknownElementBinding::Wrap)
}
}

View file

@ -26,15 +26,15 @@ impl HTMLVideoElementDerived for EventTarget {
}
impl HTMLVideoElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLVideoElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLVideoElement {
HTMLVideoElement {
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLVideoElementTypeId, localName, document)
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLVideoElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLVideoElement> {
let element = HTMLVideoElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLVideoElement> {
let element = HTMLVideoElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLVideoElementBinding::Wrap)
}
}

View file

@ -1382,7 +1382,7 @@ impl Node {
let element: JSRef<Element> = ElementCast::to_ref(node).unwrap();
let element = element.deref();
let element = build_element_from_tag(element.local_name.as_slice().to_string(),
element.namespace.clone(), *document);
element.namespace.clone(), Some(element.prefix.as_slice().to_string()), *document);
NodeCast::from_temporary(element)
},
TextNodeTypeId => {