mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Replace ScriptHelpers by GlobalRef methods
This commit is contained in:
parent
2f465265d1
commit
dd5c527689
6 changed files with 75 additions and 89 deletions
|
@ -25,7 +25,6 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
|
||||
use dom::node::{document_from_node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::window::ScriptHelpers;
|
||||
use encoding::label::encoding_from_whatwg_label;
|
||||
use encoding::types::{DecoderTrap, EncodingRef};
|
||||
use html5ever::tree_builder::NextParserState;
|
||||
|
@ -507,9 +506,8 @@ impl HTMLScriptElement {
|
|||
// Step 5.a.2.
|
||||
let window = window_from_node(self);
|
||||
rooted!(in(window.get_cx()) let mut rval = UndefinedValue());
|
||||
window.evaluate_script_on_global_with_result(&script.text,
|
||||
script.url.as_str(),
|
||||
rval.handle_mut());
|
||||
GlobalRef::Window(&window).evaluate_script_on_global_with_result(
|
||||
&script.text, script.url.as_str(), rval.handle_mut());
|
||||
|
||||
// Step 6.
|
||||
document.set_current_script(old_script.r());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue