NavigateToString - cWebView2Browser
Renders the provided HTML as top-level document
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| sHtmlContent | String | HTML document to be loaded |
Syntax
Procedure NavigateToString String sHtmlContent
Call Example
Send NavigateToString sHtmlContent
Description
Renders the provided HTML as top-level document.
The origin of this new page is about:blank.
Sample
The example below shows how to display a simple HTML page whilst disabling most user interactions.
Object oWebView2Browser is a cWebView2Browser
Set Size to 87 250
Set Location to 0 0
Set peAnchors to anAll
Set pbAreBrowserAcceleratorKeysEnabled to False
Set pbAreDefaultScriptDialogsEnabled to False
Set pbAreDefaultContextMenusEnabled to False
Set pbAreDevToolsEnabled to False
Set pbIsScriptEnabled to False
Set pbIsStatusBarEnabled to False
Set pbIsZoomControlEnabled to False
Procedure OnCreate
Forward Send OnCreate
Send NavigateToString @'
<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>
</body>
</html>'
End_Procedure
End_Object