diff options
author | James Graham <james@hoppipolla.co.uk> | 2015-04-29 19:49:38 +0100 |
---|---|---|
committer | James Graham <james@hoppipolla.co.uk> | 2015-05-14 10:59:17 +0100 |
commit | 8d10fa1f2d2d26cfb5ca5bcbee0bd6d0f77b730a (patch) | |
tree | 0fd6ebf5227dcd46475fdcbb3eb22ed7de678810 /components/script/script_task.rs | |
parent | 98cb65ca0a7d6c940e69f77275b6941499a434a3 (diff) | |
download | servo-8d10fa1f2d2d26cfb5ca5bcbee0bd6d0f77b730a.tar.gz servo-8d10fa1f2d2d26cfb5ca5bcbee0bd6d0f77b730a.zip |
Add basic support for executeAsyncScript.
This relies on a global webdriverCallback function, which is visible to content.
Obviously that's not a long term solution for a number of reasons, but it allows
us to experiment for now
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r-- | components/script/script_task.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs index df838f130e8..b114819c613 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -316,7 +316,7 @@ pub struct ScriptTask { /// The JavaScript runtime. js_runtime: Rc<Runtime>, - mouse_over_targets: DOMRefCell<Vec<JS<Node>>> + mouse_over_targets: DOMRefCell<Vec<JS<Node>>>, } /// In the event of task failure, all data on the stack runs its destructor. However, there @@ -814,7 +814,9 @@ impl ScriptTask { WebDriverScriptCommand::GetElementText(node_id, reply) => webdriver_handlers::handle_get_text(&page, pipeline_id, node_id, reply), WebDriverScriptCommand::GetTitle(reply) => - webdriver_handlers::handle_get_title(&page, pipeline_id, reply) + webdriver_handlers::handle_get_title(&page, pipeline_id, reply), + WebDriverScriptCommand::ExecuteAsyncScript(script, reply) => + webdriver_handlers::handle_execute_async_script(&page, pipeline_id, script, reply), } } |