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

LibWeb: Add in all of the plumbing required to use the JS console over IPC

This commit is contained in:
Brandon Scott 2021-02-27 21:47:14 -06:00 committed by Andreas Kling
parent 51f073ff39
commit 0682af7b65
5 changed files with 27 additions and 1 deletions

View file

@ -320,6 +320,12 @@ void OutOfProcessWebView::notify_server_did_get_source(const URL& url, const Str
on_get_source(url, source);
}
void OutOfProcessWebView::notify_server_did_js_console_output(const String& method, const String& line)
{
if (on_js_console_output)
on_js_console_output(method, line);
}
void OutOfProcessWebView::did_scroll()
{
client().post_message(Messages::WebContentServer::SetViewportRect(visible_content_rect()));
@ -351,4 +357,14 @@ void OutOfProcessWebView::get_source()
client().post_message(Messages::WebContentServer::GetSource());
}
void OutOfProcessWebView::js_console_initialize()
{
client().post_message(Messages::WebContentServer::JSConsoleInitialize());
}
void OutOfProcessWebView::js_console_input(const String& js_source)
{
client().post_message(Messages::WebContentServer::JSConsoleInput(js_source));
}
}