mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Pass a filename when executing user scripts.
This commit is contained in:
parent
18cfb9378d
commit
66c2e42ed9
1 changed files with 6 additions and 1 deletions
|
@ -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,
|
||||
);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue