1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

WebContent+WebDriver: Move Execute Script to WebContent

This commit is contained in:
Timothy Flynn 2022-11-10 20:55:17 -05:00 committed by Linus Groh
parent 88dcdf681f
commit 0b9803dc93
6 changed files with 83 additions and 48 deletions

View file

@ -735,8 +735,7 @@ Web::WebDriver::Response Client::handle_execute_script(Vector<StringView> const&
{
dbgln_if(WEBDRIVER_DEBUG, "Handling POST /session/<session_id>/execute/sync");
auto* session = TRY(find_session_with_id(parameters[0]));
auto result = TRY(session->execute_script(payload));
return make_json_value(result);
return session->web_content_connection().execute_script(payload);
}
// 13.2.2 Execute Async Script, https://w3c.github.io/webdriver/#dfn-execute-async-script