Table of Contents

Method InvokeScriptAsync

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

InvokeScriptAsync(string, IntPtr, params object[])

Executes the given JavaScript function asynchronously and returns the result via a ScriptResult event.

void InvokeScriptAsync(string scriptName, IntPtr clientData, params object[] args)

Parameters

scriptName string

The name of the script function to execute.

clientData nint

Arbirary pointer to data that can be retrieved from the result event. You can use IntPtr.Zero, new IntPtr(SomeInt) or some useful data in this parameter.

args object[]

The parameters to pass to the script function.

Remarks

The script result value can be retrieved via Text parameter of ScriptResult event args. If the execution fails IsError will return true. In this case additional script execution error information may be available via Text.