Introduce HTMLFrameElement::new.

This commit is contained in:
Ms2ger 2013-11-02 11:51:02 +01:00
parent d8198249ec
commit 996f2dcbb9
2 changed files with 17 additions and 1 deletions

View file

@ -2,15 +2,31 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLFrameElementBinding;
use dom::bindings::utils::{DOMString, ErrorResult};
use dom::document::AbstractDocument;
use dom::element::HTMLFrameElementTypeId;
use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, Node, ScriptView};
use dom::windowproxy::WindowProxy;
pub struct HTMLFrameElement {
htmlelement: HTMLElement
}
impl HTMLFrameElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFrameElement {
HTMLFrameElement {
htmlelement: HTMLElement::new(HTMLFrameElementTypeId, localName, document)
}
}
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
let element = HTMLFrameElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLFrameElementBinding::Wrap)
}
}
impl HTMLFrameElement {
pub fn Name(&self) -> DOMString {
None

View file

@ -226,7 +226,6 @@ pub fn build_element_from_tag(cx: *JSContext, tag: &str, document: AbstractDocum
handle_element!(cx, document, tag, "fieldset",HTMLFieldSetElementTypeId, HTMLFieldSetElement, []);
handle_element!(cx, document, tag, "font", HTMLFontElementTypeId, HTMLFontElement, []);
handle_element!(cx, document, tag, "form", HTMLFormElementTypeId, HTMLFormElement, []);
handle_element!(cx, document, tag, "frame", HTMLFrameElementTypeId, HTMLFrameElement, []);
handle_htmlelement!(cx, document, tag, "aside", HTMLElementTypeId, HTMLElement);
handle_htmlelement!(cx, document, tag, "b", HTMLElementTypeId, HTMLElement);
@ -239,6 +238,7 @@ pub fn build_element_from_tag(cx: *JSContext, tag: &str, document: AbstractDocum
handle_newable_element!(document, tag, "col", HTMLTableColElement);
handle_newable_element!(document, tag, "colgroup", HTMLTableColElement);
handle_newable_element!(document, tag, "del", HTMLModElement);
handle_newable_element!(document, tag, "frame", HTMLFrameElement);
handle_newable_element!(document, tag, "frameset", HTMLFrameSetElement);
handle_newable_element!(document, tag, "h1", HTMLHeadingElement, Heading1);
handle_newable_element!(document, tag, "h2", HTMLHeadingElement, Heading2);