aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlbodyelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/htmlbodyelement.rs')
-rw-r--r--src/components/script/dom/htmlbodyelement.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/script/dom/htmlbodyelement.rs b/src/components/script/dom/htmlbodyelement.rs
index 3f409a23789..4105c0742ad 100644
--- a/src/components/script/dom/htmlbodyelement.rs
+++ b/src/components/script/dom/htmlbodyelement.rs
@@ -2,14 +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::HTMLBodyElementBinding;
use dom::bindings::utils::{DOMString, ErrorResult};
+use dom::document::AbstractDocument;
+use dom::element::HTMLBodyElementTypeId;
use dom::htmlelement::HTMLElement;
+use dom::node::{AbstractNode, Node, ScriptView};
pub struct HTMLBodyElement {
htmlelement: HTMLElement
}
impl HTMLBodyElement {
+ pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLBodyElement {
+ HTMLBodyElement {
+ htmlelement: HTMLElement::new_inherited(HTMLBodyElementTypeId, localName, document)
+ }
+ }
+
+ pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
+ let element = HTMLBodyElement::new_inherited(localName, document);
+ Node::reflect_node(@mut element, document, HTMLBodyElementBinding::Wrap)
+ }
+}
+
+impl HTMLBodyElement {
pub fn Text(&self) -> DOMString {
None
}