disable and enable javascript in webview PB 6.x, Script return

Just starting out? Need help? Post your questions and find answers here.
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

disable and enable javascript in webview PB 6.x, Script return

Post by pamen »

Hi
How to consistently disable or enable Javascript in WebViewGadget on all platforms?

and when calling a JavaScript function, how to bind the return value in PB?

This is , as pointed out by Fred done by binding, how do we bind in practice
function somefun() { return("bla") ;};
to read "bla" in PB ?

C comments on eval from the source of WebView:
/**
* Evaluates arbitrary JavaScript code.
*
* Use bindings if you need to communicate the result of the evaluation.
*
* @param w The webview instance.
* @param js JS content.
*/
WEBVIEW_API webview_error_t webview_eval(webview_t w, const char *js);
S.T.V.B.E.E.V.