Description
Executes JavaScript asynchronously. This function triggers the EvaluateJavascriptFinished event.
Applies to
Syntax
controlname.EvaluateJavascriptAsync ( string script )
Argument |
Description |
---|---|
controlname |
The name of the WebBrowser control. |
script |
The JavaScript to be evaluated. |
Return value
Integer.
Returns values as follows. If any argument's value is null, the method returns null.
1 -- Success.
-1 -- General error.
-2 -- WebView2 control is invalid.
-14 -- Invalid argument.
Basic and digest authentications
When the web page to be accessed needs basic or digest authentication, the WebBrowser control will automatically display a login window for the user to enter the user name and password for authentication. If the authentication fails, this window will display again until the authentication is successful or the authentication operation is cancelled.
Examples
String ls_JS Integer li_Return ls_JS = "window.alert('This is Appeon PowerBuilder!');" li_Return = wb_1.EvaluateJavascriptAsync(ls_JS)
See also