aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmltextareaelement.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2013-10-31 16:44:47 +0100
committerMs2ger <ms2ger@gmail.com>2013-10-31 16:44:47 +0100
commit8f2b9ac413b6784315d1c5501187a2255e0050f0 (patch)
treed75a809b9cc318857afe486395ab1f695462d1d7 /src/components/script/dom/htmltextareaelement.rs
parent90fed8e53d181cc15e5db52f0ed6761e082e3b6b (diff)
downloadservo-8f2b9ac413b6784315d1c5501187a2255e0050f0.tar.gz
servo-8f2b9ac413b6784315d1c5501187a2255e0050f0.zip
Introduce HTMLTextAreaElement::new.
Diffstat (limited to 'src/components/script/dom/htmltextareaelement.rs')
-rw-r--r--src/components/script/dom/htmltextareaelement.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/script/dom/htmltextareaelement.rs b/src/components/script/dom/htmltextareaelement.rs
index 07531e87a6f..67f8d8d5bba 100644
--- a/src/components/script/dom/htmltextareaelement.rs
+++ b/src/components/script/dom/htmltextareaelement.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::HTMLTextAreaElementBinding;
use dom::bindings::utils::{DOMString, ErrorResult, Fallible};
+use dom::document::AbstractDocument;
+use dom::element::HTMLTextAreaElementTypeId;
use dom::htmlelement::HTMLElement;
+use dom::node::{AbstractNode, Node, ScriptView};
pub struct HTMLTextAreaElement {
htmlelement: HTMLElement,
}
impl HTMLTextAreaElement {
+ pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTextAreaElement {
+ HTMLTextAreaElement {
+ htmlelement: HTMLElement::new(HTMLTextAreaElementTypeId, localName, document)
+ }
+ }
+
+ pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
+ let element = HTMLTextAreaElement::new_inherited(localName, document);
+ Node::reflect_node(@mut element, document, HTMLTextAreaElementBinding::Wrap)
+ }
+}
+
+impl HTMLTextAreaElement {
pub fn Autofocus(&self) -> bool {
false
}