diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-08-04 22:36:56 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-08-04 22:36:56 +0530 |
| commit | c7e105ee4254d00f591c4c002f32c223f4c2448a (patch) | |
| tree | 17ebadd5dc1a5e148c4b2f5ed1c70b7c7e54fe1a /src/widgets/Decorations.cpp | |
| parent | 0d1258aee3f39c8d5348588a87e804ec8cd27bd5 (diff) | |
| download | null-browser-c7e105ee4254d00f591c4c002f32c223f4c2448a.tar.gz null-browser-c7e105ee4254d00f591c4c002f32c223f4c2448a.zip | |
Add on_result callback for web.view.run_js
Diffstat (limited to 'src/widgets/Decorations.cpp')
| -rw-r--r-- | src/widgets/Decorations.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/Decorations.cpp b/src/widgets/Decorations.cpp index 1cff3d4..22aa9f9 100644 --- a/src/widgets/Decorations.cpp +++ b/src/widgets/Decorations.cpp @@ -84,10 +84,11 @@ void Decorations::set_html(const QString &html, WebViewId view_id) { decoration.value()->set_html(html); } -void Decorations::run_javascript(const QString &js_code, WebViewId view_id) { +void Decorations::run_javascript(const QString &js_code, WebViewId view_id, + const JsOnResultFunc &on_result) { auto decoration = get_decoration_widget_by_view_id(view_id); if (decoration.has_value()) - decoration.value()->run_javascript(js_code); + decoration.value()->run_javascript(js_code, on_result); } std::optional<WebViewId> Decorations::get_view_id(DecorationType type) { |
