From 10d9a66ce1fc3aa2d6ddabfa16a46f2b49c76aa3 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 11 Oct 2014 03:45:40 +0530 Subject: Correct .value --- components/script/dom/htmlinputelement.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'components/script') diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index 6f17b697af8..ab9818d99f0 100644 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -155,7 +155,9 @@ impl<'a> HTMLInputElementMethods for JSRef<'a, HTMLInputElement> { make_setter!(SetType, "type") // https://html.spec.whatwg.org/multipage/forms.html#dom-input-value - make_getter!(Value) + fn Value(self) -> DOMString { + self.value.borrow().clone().unwrap_or("".to_string()) + } // https://html.spec.whatwg.org/multipage/forms.html#dom-input-value make_setter!(SetValue, "value") -- cgit v1.2.3