mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
This commit is contained in:
parent
26045d7fcb
commit
d1b433a3b3
160 changed files with 1427 additions and 1162 deletions
|
@ -72,7 +72,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
|
|||
|
||||
let name = attr.local_name().as_slice();
|
||||
if name.starts_with("on") {
|
||||
static forwarded_events: &'static [&'static str] =
|
||||
static FORWARDED_EVENTS: &'static [&'static str] =
|
||||
&["onfocus", "onload", "onscroll", "onafterprint", "onbeforeprint",
|
||||
"onbeforeunload", "onhashchange", "onlanguagechange", "onmessage",
|
||||
"onoffline", "ononline", "onpagehide", "onpageshow", "onpopstate",
|
||||
|
@ -82,7 +82,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
|
|||
window.get_url(),
|
||||
window.reflector().get_jsobject());
|
||||
let evtarget: JSRef<EventTarget> =
|
||||
if forwarded_events.iter().any(|&event| name == event) {
|
||||
if FORWARDED_EVENTS.iter().any(|&event| name == event) {
|
||||
EventTargetCast::from_ref(*window)
|
||||
} else {
|
||||
EventTargetCast::from_ref(*self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue