Introduce HTMLObjectElement::new.

This commit is contained in:
Ms2ger 2013-11-01 22:02:32 +01:00
parent 9fbc45ae9c
commit b20461f253
2 changed files with 17 additions and 2 deletions

View file

@ -2,10 +2,12 @@
* 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::HTMLObjectElementBinding;
use dom::bindings::utils::{DOMString, ErrorResult};
use dom::document::AbstractDocument;
use dom::element::HTMLObjectElementTypeId;
use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, ScriptView};
use dom::node::{AbstractNode, Node, ScriptView};
use dom::validitystate::ValidityState;
use dom::windowproxy::WindowProxy;
@ -13,6 +15,19 @@ pub struct HTMLObjectElement {
htmlelement: HTMLElement
}
impl HTMLObjectElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLObjectElement {
HTMLObjectElement {
htmlelement: HTMLElement::new(HTMLObjectElementTypeId, localName, document)
}
}
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
let element = HTMLObjectElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLObjectElementBinding::Wrap)
}
}
impl HTMLObjectElement {
pub fn Data(&self) -> DOMString {
None