diff options
Diffstat (limited to 'components/script/dom/htmlbuttonelement.rs')
-rw-r--r-- | components/script/dom/htmlbuttonelement.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs index 7129681ea41..de9433cce18 100644 --- a/components/script/dom/htmlbuttonelement.rs +++ b/components/script/dom/htmlbuttonelement.rs @@ -83,7 +83,7 @@ impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> { let elem: JSRef<Element> = ElementCast::from_ref(self); let ty = elem.get_string_attribute(&atom!("type")).into_ascii_lowercase(); // https://html.spec.whatwg.org/multipage/#attr-button-type - match ty.as_slice() { + match &*ty { "reset" | "button" | "menu" => ty, _ => "submit".to_owned() } |