mirror of
https://github.com/servo/servo.git
synced 2025-06-11 01:50:10 +00:00
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
This commit is contained in:
parent
98cb65ca0a
commit
8d10fa1f2d
6 changed files with 96 additions and 35 deletions
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue