DesktopHTMLViewer.JavaScriptRequest

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Event


DesktopHTMLViewer.JavaScriptRequest(method As String, parameters() As Variant) As String

New in 2021r3

Supported for all project types and targets.

Called when a JavaScript executed via ExecuteJavaScript or ExecuteJavaScriptSync calls ExecuteInXojo or ExecuteInXojoSync.

Notes

A JavaScript executed via ExecuteJavaScript or ExecuteJavaScriptSync can call executeInXojo() or executeInXojoSync() to pass data back to the HTMLViewer via this event. Both can be passed any number of parameters though the first parameter must be a string. For all subsequent parameters, only strings and numbers are supported. The executeInXojo() method is asynchronous and thus will not receive a value returned by this event. The executeInXojoSync() method is synchronous and thus should be called as a function as it will receive the value returned by this event.

See Also

ExecuteJavaScript and ExecuteJavaScriptSync methods.