aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/htmlinputelement.rs4
1 files changed, 3 insertions, 1 deletions
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")