Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6e

Application v 6.3a

  

 

Chapter Twenty-oneWebView Interface (continued)

WebViewGetContents Function

Overview

The WebViewGetContents function returns the rendered contents of a page or frame within the WebView. This is not the same as the source of the document as any alterations to the DOM are included.

Syntax/Parameters

Syntax

string = WebViewGetContents ( handle hWVO, [int frame_index] );

Parameters

hWVO

A handle specifying a WebView Object.

frame_index

An optional specifying a zero-based frame index. The default is -1 for no frame.

Return Value

A string representing the current DOM contents of the WebView’s top level page or frame. An empty string is returned on failure. Use GetLastError to retrieve additional error information.

Remarks

This function runs the following Javascript to get the contents of the DOM depending on the value of frame_index:

window.top.document.documentElement.outerHTML

or

window.frames[frame_index].document.documentElement.outerHTML

Because this function uses the DOM to get the contents of the document any alterations that were done to the source document are included. Because the function uses outerHTML property the resulting string may not contain all events or data attributes.

Related Functions

Platform Support

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

Page revised 2025-10-20