diff --git a/gb.gtk3/src/webview/c_webview.c b/gb.gtk3/src/webview/c_webview.c index 063d6957a..30fabfff3 100644 --- a/gb.gtk3/src/webview/c_webview.c +++ b/gb.gtk3/src/webview/c_webview.c @@ -393,7 +393,7 @@ BEGIN_METHOD(WebView_ExecJavascript, GB_STRING script) webkit_web_view_run_javascript(WIDGET, script, NULL, (GAsyncReadyCallback)cb_javascript_finished, (gpointer)THIS); while(THIS->js_running) - GB.Wait(0); + GB.Wait(-1); if (THIS->js_error) { diff --git a/gb.qt5/src/webview/c_webview.cpp b/gb.qt5/src/webview/c_webview.cpp index 6654e846a..199222d5f 100644 --- a/gb.qt5/src/webview/c_webview.cpp +++ b/gb.qt5/src/webview/c_webview.cpp @@ -447,7 +447,7 @@ BEGIN_METHOD(WebView_ExecJavascript, GB_STRING script) WIDGET->page()->runJavaScript(QSTRING_ARG(script), cb_javascript_finished); while(_js_running) - GB.Wait(0); + GB.Wait(-1); if (_js_error) {