add namespaces to elements

This commit is contained in:
Daniel Glazman 2013-12-09 15:01:47 +01:00
parent 76e3b34c75
commit 28575c20bf
4 changed files with 21 additions and 10 deletions

View file

@ -9,6 +9,7 @@ use dom::element::{Element, ElementTypeId, HTMLElementTypeId};
use dom::node::{AbstractNode, Node, ScriptView};
use js::jsapi::{JSContext, JSVal};
use js::JSVAL_NULL;
use dom::namespace;
pub struct HTMLElement {
element: Element
@ -17,7 +18,7 @@ pub struct HTMLElement {
impl HTMLElement {
pub fn new_inherited(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLElement {
HTMLElement {
element: Element::new(type_id, tag_name, document)
element: Element::new(type_id, tag_name, namespace::HTML, document)
}
}