mirror of
https://github.com/servo/servo.git
synced 2025-06-13 02:44:29 +00:00
Introduce HTMLObjectElement::new.
This commit is contained in:
parent
9fbc45ae9c
commit
b20461f253
2 changed files with 17 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue