Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6e

Application v 6.3a

  

 

Chapter Twenty-oneWebView Interface (continued)

WebViewWait Function

Overview

The WebViewWait function processes application messages, allowing the WebView to process callbacks and handle user interaction.

Syntax/Parameters

Syntax

int = WebViewWait ( handle hWVO, [int duration] );

Parameters

hWVO

A handle specifying a WebView Object.

duration

An optional int specifying the amount of time to wait in milliseconds. The default value is 1000.

Return Value

An int as ERROR_NONE (0) or a formatted error code on failure. An ERROR_TIMEOUT will be returned if the full duration is waited.

Remarks

This function does not actually wait for any specific event but instead waits for the WebView to perform any user interactions and or callbacks. Because the WebView requires the main application thread to process messages using this function is important for the stability of WebView. For example, while waiting for a JavaScript function the following code could be used:

result = JavaScriptRun(hWebView, myJavaScript);
ix = 0;
while (JavaScriptIsComplete(result) == false) {
  WebViewWait(hWebView, 1000);
  ix++;
  if (ix >= 10) {
    break;
    }
  }

This allows for the WebView to process and the script to gracefully wait for completion of a JavaScript operation.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Page revised 2025-10-20