#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private xui As XUI
Private Button1 As B4XView
Private wv As WebView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
wv.LoadUrl("http://b4x.com")
End Sub
Sub Button1_Click
ExecuteJavaScript(wv, "window.find('community)")
End Sub
#Region WebView JS
Sub ExecuteJavaScript (wv2 As WebView, script As String) As Object
Dim jo As JavaObject = wv2
Return jo.RunMethodJO("getEngine", Null).RunMethod("executeScript", Array(script))
End Sub
#End Region