Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private wv As WebView
Private we, wvjo As JavaObject
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
wv.Initialize("wv")
we.InitializeNewInstance("javafx.scene.web.WebEngine",Null)
wvjo = wv
we = wvjo.RunMethod("getEngine",Null)
Dim e As Object = we.CreateEvent("javafx.event.EventHandler", "wv", False)
we.RunMethod("setOnAlert", Array(e))
MainForm.rootpane.AddNode(wv, 0, 0, -1,-1)
MainForm.Show
wv.LoadUrl("some web page with a javascript alert")
End Sub
Sub wv_Event(MethodName As String, Args() As Object)
Log(Args(0))
'RETURNS:
'WebEvent [source = javafx.scene.web.WebEngine@10336ad5, eventType = WEB_ALERT, data = my_alert_message]
End Sub