From c7e105ee4254d00f591c4c002f32c223f4c2448a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Mon, 4 Aug 2025 22:36:56 +0530 Subject: Add on_result callback for web.view.run_js --- src/widgets/WebView.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/widgets/WebView.hpp') diff --git a/src/widgets/WebView.hpp b/src/widgets/WebView.hpp index 36a252d..0f2bd43 100644 --- a/src/widgets/WebView.hpp +++ b/src/widgets/WebView.hpp @@ -20,6 +20,8 @@ using RpcArgs = std::unordered_map; using RpcFunc = std::function; +using JsOnResultFunc = std::function &value)>; + class WebView : public QWebEngineView { Q_OBJECT @@ -31,6 +33,7 @@ public: void scroll_to_bottom(); void enable_rpc_api(); void expose_rpc_function(const QString &name, const RpcFunc &action); + // void run_javascript(const QString &code, const JsOnResultFunc &on_result); DELEGATE(page(), runJavaScript, run_javascript) DEFINE_GETTER(get_id, id) -- cgit v1.3.1