The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
x-ms-webview.invokeScriptAsync method

As an asynchronous action, executes the specified script function from the currently loaded HTML, with specific arguments.
Syntax
x-ms-webview.invokeScriptAsync(scriptName, args)
Parameters
- scriptName
-
Type: String
The name of the script function to invoke.
- args
-
Type: Object
A string array that packages arguments to the script function.
Return value
Type: MSWebViewAsyncOperation
When using invokeScriptAsync, you need to define success and error handlers after defining the operation. After applying the event handlers, call x-ms-webview.start to execute the operation.
var asyncOp = webView.invokeScriptAsync(scriptName, args);
asyncOp.oncomplete = completedHandler;
asyncOp.onerror = errorHandler;
asyncOp.start();
Remarks
Requirements
|
Minimum supported client |
Windows 8.1 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2012 R2 [desktop apps only] |
|
Minimum supported phone |
Windows Phone 8.1 |
See also
Show: