Correct <input>.value

This commit is contained in:
Manish Goregaokar 2014-10-11 03:45:40 +05:30
parent b28a4c8858
commit 10d9a66ce1

View file

@ -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")