diff options
author | Matthew Rasmus <mattr@zzntd.com> | 2014-12-07 11:04:39 -0800 |
---|---|---|
committer | Matthew Rasmus <mattr@zzntd.com> | 2014-12-16 11:34:04 -0800 |
commit | 7e0c39a82d5ca9d766c0065f4cb6ba79b1cbe037 (patch) | |
tree | 0e0c5a9c40bde5ad035d5f556411725cf3d59a34 /components/script/dom/htmlformelement.rs | |
parent | a3b3295d80194becf83f153e480df7f19c3e2971 (diff) | |
download | servo-7e0c39a82d5ca9d766c0065f4cb6ba79b1cbe037.tar.gz servo-7e0c39a82d5ca9d766c0065f4cb6ba79b1cbe037.zip |
Implements FormControl for HTMLTextAreaElement
Diffstat (limited to 'components/script/dom/htmlformelement.rs')
-rw-r--r-- | components/script/dom/htmlformelement.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index 8f5b0180c02..62b08649f7f 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::HTMLFormElementBinding; use dom::bindings::codegen::Bindings::HTMLFormElementBinding::HTMLFormElementMethods; use dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods; use dom::bindings::codegen::InheritTypes::{EventTargetCast, HTMLFormElementDerived, NodeCast}; -use dom::bindings::codegen::InheritTypes::HTMLInputElementCast; +use dom::bindings::codegen::InheritTypes::{HTMLInputElementCast, HTMLTextAreaElementCast}; use dom::bindings::global::Window; use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector}; @@ -20,6 +20,7 @@ use dom::event::{Event, EventHelpers, Bubbles, Cancelable}; use dom::eventtarget::{EventTarget, NodeTargetTypeId}; use dom::htmlelement::HTMLElement; use dom::htmlinputelement::HTMLInputElement; +use dom::htmltextareaelement::HTMLTextAreaElement; use dom::node::{Node, NodeHelpers, ElementNodeTypeId, document_from_node, window_from_node}; use hyper::method::Post; use servo_msg::constellation_msg::LoadData; @@ -362,8 +363,9 @@ impl<'a> HTMLFormElementHelpers for JSRef<'a, HTMLFormElement> { {} } ElementNodeTypeId(HTMLTextAreaElementTypeId) => { - // Unimplemented - {} + let textarea: JSRef<HTMLTextAreaElement> = HTMLTextAreaElementCast::to_ref(child) + .unwrap(); + textarea.reset() } ElementNodeTypeId(HTMLOutputElementTypeId) => { // Unimplemented |