|   | GoFiler Legato Script Reference 
 Legato v 1.6e Application v 6.3a 
 | 
| Table of Contents | < < Previous | Next >> | 
Chapter Twenty-one — WebView Interface
WebView is a container and interface provide access to Microsoft’s WebView2, a Chromium based web browser. This feature is embedded as an option within some Novaworks applications. Unlike opening an HTML file within the application the WebView fully processes JavaScipt within the HTML document. WebView is instantiated and controlled programmatically, allowing programmers to integrate web-based interfaces or remote content directly into native or embedded applications.
When used with Legato, WebView provides a bridge between the embedded system’s native capabilities and dynamic web content, making it easier to deliver modern UIs, access cloud services, or expose diagnostic tools without leaving the embedded environment.
A WebView can be instantiated as an MDI view or tab within the application, float as a pop-up window or be hidden. Once established, pages can be navigated to and JavaScript injected to control the actions of pages.
While the application and Legato refer to the interface as WebView which embeds WebView2, the term WebView will be used synonymously for both the interface wrapper and WebView itself.
WebView is presently released as a capabilities preview. API functions and features are subject to change.
The WebView window runs independently of the application threading. However, interactions between the application and the WebView2 component do require the primary application thread to execute. When designing scripts that work with WebView, developers should either wait for operations to complete within the view or use the JavaScript messaging system to have the WebView notify the script when an action is completed. Developers MUST avoid waiting for operations to complete within WebView callbacks.
A WebView browser is opened with WebViewOpenWindow or the WebViewOpenTab functions. These functions return a WebView Object Handle. This handle is then used to interface and control the WebView object. The browser window will remain open until closed by the WebViewCloseWindow function, by the user, or through JavaScript. Using CloseHandle will not close the window, even if it is hidden.
Because users can close the WebView while scripts are running developers should check the return values of functions for a Bad Handle error.
21.1.4 JavaScript Side Scripting
WebView interfaces directly with JavaScript. Developers can inject JavaScript onto the current page or automatically on to every page as the user navigates. Developers must not that JavaScript that is run on the page must follow the Content Security Policy of the page. Many of the JavaScript API commands use a JavaScript Result Handle. This handle can be used to read the result of a JavaScript call.
Page revised 2025-10-20
| Table of Contents | < < Previous | Next >> | 
© 2012-2025 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission is prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. Novaworks, GoFiler™ and Legato™ are registered trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are the property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.