diff options
author | Josh Matthews <josh@joshmatthews.net> | 2015-11-12 11:20:08 -0500 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2016-02-11 15:44:52 +0100 |
commit | 2796a4dfa82c47109d4081ed80965286b7a78b73 (patch) | |
tree | f801d2ce0247c8efe9245b8e47aea382478b64c0 /components/script/dom/htmlbodyelement.rs | |
parent | 3703e6d4f644ca97d1f5e012ce8edd8cfaa2c407 (diff) | |
download | servo-2796a4dfa82c47109d4081ed80965286b7a78b73.tar.gz servo-2796a4dfa82c47109d4081ed80965286b7a78b73.zip |
Compile raw inline event handlers lazily. Resolves #8489.
Diffstat (limited to 'components/script/dom/htmlbodyelement.rs')
-rw-r--r-- | components/script/dom/htmlbodyelement.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs index f082a4c8ced..8ac184ea51d 100644 --- a/components/script/dom/htmlbodyelement.rs +++ b/components/script/dom/htmlbodyelement.rs @@ -162,9 +162,6 @@ impl VirtualMethods for HTMLBodyElement { let do_super_mutate = match (attr.local_name(), mutation) { (name, AttributeMutation::Set(_)) if name.starts_with("on") => { let window = window_from_node(self); - let (cx, url, reflector) = (window.get_cx(), - window.get_url(), - window.reflector().get_jsobject()); // https://html.spec.whatwg.org/multipage/ // #event-handlers-on-elements,-document-objects,-and-window-objects:event-handlers-3 match name { @@ -175,7 +172,9 @@ impl VirtualMethods for HTMLBodyElement { &atom!("onresize") | &atom!("onunload") | &atom!("onerror") => { let evtarget = window.upcast::<EventTarget>(); // forwarded event - evtarget.set_event_handler_uncompiled(cx, url, reflector, + let source_line = 1; //TODO(#9604) obtain current JS execution line + evtarget.set_event_handler_uncompiled(window.get_url(), + source_line, &name[2..], DOMString::from((**attr.value()).to_owned())); false |