Basics
Guides
API Reference
Basics
Guides
API Reference
[10:7] extends: FxObj
Wraps JavaFX WebEngine, the non-visual web page loader and DOM manager embedded inside a WebView. Use it to load URLs, inject HTML content, run JavaScript, and query the current page location. Obtain an instance via WebView.getEngine().
load (string Url)
Loads the web page at the given URL into the engine.
Url is a string with the URL to load (e.g., "https://example.com").this objectloadContent (string HtmlContent)
Loads the given HTML string directly into the engine as a new page.
HtmlContent is a string containing the HTML markup to render.this objectgetLocation ()
Returns the URL of the currently loaded page.
A string with the current page URL, or an empty string if no page is loaded.getTitle ()
Returns the title of the currently loaded page.
A string with the page title, or null if no title is set.executeScript (string Script)
Executes a JavaScript expression in the context of the currently loaded page.
Script is a string containing the JavaScript expression to evaluate.The result of the JavaScript expression, or null for void results.reload ()
Reloads the currently loaded page.
this objectgetLoadWorker ()
Returns the LoadWorker tracking the progress of the current load.
An AJO wrapping javafx.concurrent.WorkergetDocument ()
Returns the parsed DOM Document for the currently loaded page, or null when no page has been loaded yet.
An AJO wrapping org.w3c.dom.Document, or null.documentProperty ()
Returns the read-only ObjectProperty backing the parsed DOM document.
An AJO wrapping javafx.beans.property.ReadOnlyObjectPropertylocationProperty ()
Returns the read-only StringProperty backing the current page URL.
An AJO wrapping javafx.beans.property.ReadOnlyStringProperty.titleProperty ()
Returns the read-only StringProperty backing the current page title.
An AJO wrapping javafx.beans.property.ReadOnlyStringProperty.setJavaScriptEnabled (bool Enabled)
Enables or disables JavaScript execution in the engine.
Enabled is a bool; true allows JavaScript to run.this object for chainingisJavaScriptEnabled ()
Returns whether JavaScript execution is currently enabled.
A bool; true when JavaScript is allowed.javaScriptEnabledProperty ()
Returns the BooleanProperty backing the JavaScript-enabled flag.
An AJO wrapping javafx.beans.property.BooleanProperty.setUserStyleSheetLocation (string Location)
Sets the location of the user-supplied style sheet (CSS) applied on top of the page's own styles. Pass a URL or data: URI; pass null to clear.
Location is a string URL pointing at the CSS, or null.this object for chaininggetUserStyleSheetLocation ()
Returns the location of the user-supplied style sheet.
A string with the CSS URL, or null when unset.userStyleSheetLocationProperty ()
Returns the StringProperty backing the user style sheet location.
An AJO wrapping javafx.beans.property.StringProperty.getUserDataDirectory ()
Returns the directory used to store user-data for this engine, or null when JavaFX has chosen no directory yet.
An AJO wrapping java.io.File, or null.setUserDataDirectory (string Dir)
Sets the directory used to store user-data for this engine.
Dir is a string with the absolute directory path.this object for chaininguserDataDirectoryProperty ()
Returns the ObjectProperty backing the user-data directory.
An AJO wrapping javafx.beans.property.ObjectPropertysetUserAgent (string Agent)
Sets the user-agent string sent with HTTP requests.
Agent is a string with the user-agent header value.this object for chaininggetUserAgent ()
Returns the current user-agent string.
A string with the user-agent value.userAgentProperty ()
Returns the StringProperty backing the user-agent string.
An AJO wrapping javafx.beans.property.StringProperty.getOnAlert ()
Returns the current onAlert handler.
An AJO wrapping javafx.event.EventHandler<WebEventsetOnAlert (callback OnAlert)
Registers a handler for JavaScript alert() calls.
OnAlert is a callback invoked with a WebEvent payload.this object for chainingonAlertProperty ()
Returns the ObjectProperty backing the onAlert handler.
An AJO wrapping javafx.beans.property.ObjectProperty<EventHandler<WebEventgetOnStatusChanged ()
Returns the current onStatusChanged handler.
An AJO wrapping javafx.event.EventHandler<WebEventsetOnStatusChanged (callback OnStatus)
Registers a handler for window.status changes.
OnStatus is a callback invoked with a WebEvent payload.this object for chainingonStatusChangedProperty ()
Returns the ObjectProperty backing the onStatusChanged handler.
An AJO wrapping javafx.beans.property.ObjectProperty<EventHandler<WebEventgetOnResized ()
Returns the current onResized handler.
An AJO wrapping javafx.event.EventHandler<WebEventsetOnResized (callback OnResize)
Registers a handler for window.resize requests issued by the page.
OnResize is a callback invoked with a WebEvent payload.this object for chainingonResizedProperty ()
Returns the ObjectProperty backing the onResized handler.
An AJO wrapping javafx.beans.property.ObjectProperty<EventHandler<WebEventgetOnVisibilityChanged ()
Returns the current onVisibilityChanged handler.
An AJO wrapping javafx.event.EventHandler<WebEventsetOnVisibilityChanged (callback OnVis)
Registers a handler for window.visibility change requests.
OnVis is a callback invoked with a WebEvent payload.this object for chainingonVisibilityChangedProperty ()
Returns the ObjectProperty backing the onVisibilityChanged handler.
An AJO wrapping javafx.beans.property.ObjectProperty<EventHandler<WebEventgetCreatePopupHandler ()
Returns the current createPopupHandler callback.
An AJO wrapping javafx.util.Callback<PopupFeatures, WebEngine>.setCreatePopupHandler (callback OnCreate)
Registers a callback that builds the WebEngine to back JavaScript popup windows opened by the page.
OnCreate is a callback invoked with a PopupFeatures argument.this object for chainingcreatePopupHandlerProperty ()
Returns the ObjectProperty backing the createPopupHandler callback.
An AJO wrapping javafx.beans.property.ObjectProperty<Callback<PopupFeatures, WebEngine>>.getConfirmHandler ()
Returns the current confirm() handler.
An AJO wrapping javafx.util.Callback<String, Boolean>.setConfirmHandler (callback OnConfirm)
Registers a handler for JavaScript confirm() calls. The callback returns a Boolean accept/reject answer.
OnConfirm is a callback invoked with the confirm message string.this object for chainingconfirmHandlerProperty ()
Returns the ObjectProperty backing the confirm handler.
An AJO wrapping javafx.beans.property.ObjectProperty<Callback<String, Boolean>>.getPromptHandler ()
Returns the current prompt() handler.
An AJO wrapping javafx.util.Callback<PromptData, String>.setPromptHandler (callback OnPrompt)
Registers a handler for JavaScript prompt() calls. The callback receives a PromptData payload and returns the prompt text (or null to cancel).
OnPrompt is a callback invoked with a PromptData object.this object for chainingpromptHandlerProperty ()
Returns the ObjectProperty backing the prompt handler.
An AJO wrapping javafx.beans.property.ObjectProperty<Callback<PromptData, String>>.getOnError ()
Returns the current onError handler.
An AJO wrapping javafx.event.EventHandlersetOnError (callback OnError)
Registers a handler for engine error events such as load failures.
OnError is a callback invoked with a WebErrorEvent.this object for chainingonErrorProperty ()
Returns the ObjectProperty backing the onError handler.
An AJO wrapping javafx.beans.property.ObjectProperty<EventHandlergetHistory ()
Returns the navigation history object for this engine.
An AJO wrapping javafx.scene.web.WebHistory.print (object Job)
Prints the current page using the given PrinterJob.
Job is an AJO wrapping a javafx.print.PrinterJob.this object for chaining
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.