diff options
-rw-r--r-- | components/script/dom/userscripts.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/components/script/dom/userscripts.rs b/components/script/dom/userscripts.rs index d9816648dec..1ba79ac5b69 100644 --- a/components/script/dom/userscripts.rs +++ b/components/script/dom/userscripts.rs @@ -40,7 +40,12 @@ pub fn load_script(head: &HTMLHeadElement) { f.read_to_end(&mut contents).unwrap(); let script_text = String::from_utf8_lossy(&contents); win.upcast::<GlobalScope>() - .evaluate_js_on_global_with_result(&script_text, rval.handle_mut()); + .evaluate_script_on_global_with_result( + &script_text, + &file.to_string_lossy(), + rval.handle_mut(), + 1, + ); } })); } |