### Access WebEngine API Methods

Examples using JavaObjects (requires the JavaObject library)
1 = Get the WebEngine from the WebView
2 = Access the WebEngine methods
Define WebView
Private wv As WebView
Get the webview as JavaObject
Dim joWV As JavaObject = wv
See here for the JavaFX webview class (javafx.scene.web.WebView):
http://docs.oracle.com/javafx/2/api/javafx/scene/web/WebView.html
Get the webengine from the webview using method getEngine
Dim joWE As JavaObject = joWV.RunMethod("getEngine", Null)
See here for the JavaFX webengine class (avafx.scene.web.WebEngine):
http://docs.oracle.com/javafx/2/api/javafx/scene/web/WebEngine.html
Examples using the methods
Obtain the page title from the webengine JavaObject using method getTitle
Dim pagetitle as String = joWE.RunMethod("getTitle", Null)
Get the number of web pages visited.
Dim webpagesvisited as Int = joWE.RunMethod("executeScript", Array As String("history.length"))

Changed: , Category: WebView, File: T6C284M2124.htm, ID: 2124