From 8604765c3660dbea9cae6996d5750bfb985e6751 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 27 Jul 2025 20:21:07 +0530 Subject: Add web.view.run_js + change rpc js api --- src/WindowActionRouter.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/WindowActionRouter.cpp') diff --git a/src/WindowActionRouter.cpp b/src/WindowActionRouter.cpp index d0cc6d0..3db1cb3 100644 --- a/src/WindowActionRouter.cpp +++ b/src/WindowActionRouter.cpp @@ -77,6 +77,11 @@ void WindowActionRouter::initialize(Configuration *config) { WITH_WEBVIEW_WINDOW(webview_id, window, { window->expose_rpc_function(name, action, webview_id); }); }); + connect(&runtime, &LuaRuntime::webview_js_eval_requested, this, + [this](const QString &js_code, WebViewId webview_id) { + WITH_WEBVIEW_WINDOW(webview_id, window, + { window->run_javascript(js_code, webview_id); }); + }); // Search connect(&runtime, &LuaRuntime::search_requested, this, -- cgit v1.3.1