aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/macros.rs')
-rw-r--r--components/script/dom/macros.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs
index e67f04b30ba..646baabf785 100644
--- a/components/script/dom/macros.rs
+++ b/components/script/dom/macros.rs
@@ -106,13 +106,14 @@ macro_rules! make_enumerated_getter(
use dom::bindings::codegen::InheritTypes::ElementCast;
#[allow(unused_imports)]
use std::ascii::AsciiExt;
+ use std::borrow::ToOwned;
let element: JSRef<Element> = ElementCast::from_ref(self);
let val = element.get_string_attribute(&Atom::from_slice($htmlname))
.into_ascii_lower();
// https://html.spec.whatwg.org/multipage/forms.html#attr-fs-method
match val.as_slice() {
$($choices)|+ => val,
- _ => $default.into_string()
+ _ => $default.to_owned()
}
}
);