Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebBrowser

A widget that embeds a web browser. This widget always captures the mouse wheel when the mouse cursor is over the browser. The keyboard is captured when clicking anywhere on the browser and released when the mouse cursor leaves the widget. Because of an issue in Unreal Engine, this widget should be used as the only widget in a UIElement, otherwise the colors shown in the browser will not be correct (missing sRGB to linear color conversion).

Hierarchy

Index

Properties

onLoadFinished

onLoadFinished: MulticastDelegate<(browser: this, success: boolean) => void>

Called when a document has finished loading

onLoadStarted

onLoadStarted: MulticastDelegate<(browser: this) => void>

Called when a new document starts loading

onURLChanged

onURLChanged: MulticastDelegate<(browser: this, uRL: string) => void>

Called when the URL changes through an action (clicking on a link, going backward or forward). Not called when setting the URL through setURL.

Methods

canGoBack

  • canGoBack(): boolean
  • Return whether the browser can currently go back

    Returns boolean

canGoForward

  • canGoForward(): boolean
  • Return whether the browser can currently go forward

    Returns boolean

getOwningObject

getParent

  • getParent(): Widget | undefined
  • Return the widget that contains this widget, for example a border that wraps a check box. Returns undefined if this object has no parent.

    Returns Widget | undefined

getURL

  • getURL(): string

goBack

  • goBack(): void

goForward

  • goForward(): void

isEnabled

  • isEnabled(): boolean

isLoading

  • isLoading(): boolean
  • Return whether the browser is currently loading a document.

    Returns boolean

isVisible

  • isVisible(): boolean

reload

  • reload(): void
  • Reload the currently shown document

    Returns void

setEnabled

  • setEnabled(enabled: boolean): this
  • Set whether the widget is enabled. When a widget is disabled, users can't interact with it and it is greyed out. When a widget that contains other widgets (like VerticalBox) is disabled, all its children behave as if disabled, too. By default, widgets are enabled.

    Parameters

    • enabled: boolean

      Whether to enable the widget.

    Returns this

setURL

  • Set the current URL. Local URLs (file:// protocol) are not permitted.

    Parameters

    • url: string

    Returns WebBrowser

setVisible

  • setVisible(visible: boolean): Widget
  • Set whether the widget is visible. When a widget that contains other widgets (like VerticalBox) is invisible, all its children are invisible, too. The layout of widgets is updated when visibility changes, and invisible widgets are treated as if they don't exist.

    Parameters

    • visible: boolean

      Whether the widget is visible.

    Returns Widget

stopLoad

  • stopLoad(): void
  • Stop loading the current document. Does not have an effect if the document is already loaded.

    Returns void