Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Show
WebView1.LoadUrl("https://www.google.com")
Wait For WebView1_PageFinished (Url As String)
ExecuteJavaScript(WebView1, $"document.body.style.backgroundColor = '#F00'"$)
End Sub
Sub ExecuteJavaScript (wv As WebView, script As String) As Object
Dim jo As JavaObject = wv
Return jo.RunMethodJO("getEngine", Null).RunMethod("executeScript", Array(script))
End Sub