aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlbodyelement.rs
diff options
context:
space:
mode:
authorJack Moffitt <jack@metajack.im>2014-06-01 00:21:53 -0600
committerJack Moffitt <jack@metajack.im>2014-06-05 09:58:59 -0600
commit629c4c6afe7cea86c051bb9f52adeac716e2c43f (patch)
treeee84d9a9b37ecd37e0a9606509624e7f728f5a81 /src/components/script/dom/htmlbodyelement.rs
parent2ae671b5aa9d27812adcdb8ebc749733156df66e (diff)
downloadservo-629c4c6afe7cea86c051bb9f52adeac716e2c43f.tar.gz
servo-629c4c6afe7cea86c051bb9f52adeac716e2c43f.zip
Upgrade Rust.
Diffstat (limited to 'src/components/script/dom/htmlbodyelement.rs')
-rw-r--r--src/components/script/dom/htmlbodyelement.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/script/dom/htmlbodyelement.rs b/src/components/script/dom/htmlbodyelement.rs
index fc3196062b7..bf02ba963cd 100644
--- a/src/components/script/dom/htmlbodyelement.rs
+++ b/src/components/script/dom/htmlbodyelement.rs
@@ -70,7 +70,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
_ => (),
}
- if name.starts_with("on") {
+ if name.as_slice().starts_with("on") {
static forwarded_events: &'static [&'static str] =
&["onfocus", "onload", "onscroll", "onafterprint", "onbeforeprint",
"onbeforeunload", "onhashchange", "onlanguagechange", "onmessage",
@@ -87,7 +87,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
EventTargetCast::from_mut_ref(self)
};
evtarget.set_event_handler_uncompiled(cx, url, reflector,
- name.slice_from(2).to_owned(),
+ name.as_slice().slice_from(2),
value);
}
}