x-ms-webview.invokeScriptAsync method

Applies to Windows and Windows Phone

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

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1

See also

x-ms-webview

 

 

Show:
© 2014 Microsoft