From ab7098b33bb0ba0bfd941fcbd173cc00261bf5c9 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Fri, 5 Nov 2021 10:04:45 +0100 Subject: [PATCH] Add note to RunScript() to recommend RunScriptAsync() --- interface/wx/webview.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/wx/webview.h b/interface/wx/webview.h index 9ab49ff0b7..2c13aa4588 100644 --- a/interface/wx/webview.h +++ b/interface/wx/webview.h @@ -714,6 +714,11 @@ public: /** Runs the given JavaScript code. + @note Because of various potential issues it's recommended to use + RunScriptAsync() instead of this method. This is especially true + if you plan to run code from a webview event and will also prevent + unintended side effects on the UI outside of the webview. + JavaScript code is executed inside the browser control and has full access to DOM and other browser-provided functionality. For example, this code