Table of Contents

ITMSFNCCustomWebBrowser Interface

Core platform abstraction for an embedded web browser; implemented by each platform-specific provider.

API unit family: TMSFNCWebBrowser Extends: IInterface

Syntax

ITMSFNCCustomWebBrowser = interface(IInterface)

Properties

Name Description
AutoClearCache When True, clears the browser cache automatically on startup.
CacheFolder Base directory for browser cache files; defaults to the application data folder.
CacheFolderName Name of the sub-folder appended to CacheFolder where the browser stores its cache files.
EnableAcceleratorKeys When True, built-in browser keyboard shortcuts such as Ctrl+F are active.
EnableContextMenu When True, the browser shows its built-in right-click context menu.
EnableShowDebugConsole When True, the browser can show the developer debug console.
ExternalBrowser When True, URLs are opened in the system default browser instead of the embedded control.
URL URL the browser navigates to when Navigate is called without arguments.
UserAgent Custom user-agent string sent with HTTP requests; leave empty to use the platform default.

Methods

Name Description
AddBridge Registers a native object as a named JavaScript bridge accessible from page scripts.
BeforeChangeParent Called before the host control parent window changes so the platform browser can release window references.
CanGoBack Determines whether the browser history contains an entry to navigate back to.
CanGoForward Determines whether the browser history contains an entry to navigate forward to.
CaptureScreenShot Captures the current browser viewport as an image and optionally invokes a completion callback.
ClearCache Clears the browser disk and memory cache.
ClearFocus Removes keyboard focus from the browser control.
Close Closes the browser and releases platform resources.
DeInitialize Releases the platform-specific browser instance and frees associated resources.
ExecuteJavaScript Executes a JavaScript expression in the browser context.
GetBrowserInstance Returns the platform browser as an IInterface reference for cross-platform interop.
GoBack Navigates backward in the browser history.
GoForward Navigates forward in the browser history.
Initialize Creates and initializes the platform-specific browser instance.
IsFMXBrowser Determines whether the platform browser is hosted inside an FMX application.
LoadFile Loads a local file into the browser from the specified file path.
LoadHTML Loads an HTML string directly into the browser without a navigation request.
NativeBrowser Returns a pointer to the underlying platform browser control instance.
NativeDialog Returns a pointer to the active platform dialog handle.
NativeEnvironment Returns a pointer to the platform-specific browser environment object.
Navigate Navigates the browser to the specified URL.
Reload Reloads the current page.
RemoveBridge Unregisters a previously registered JavaScript bridge by name.
SetFocus Transfers keyboard focus to the browser control.
ShowDebugConsole Opens the platform developer tools or debug console.
StopLoading Stops the current page load.
UpdateBounds Notifies the platform browser to synchronize its position and size with the host control bounds.
UpdateContentFromControl Notifies the platform browser to synchronize content with the host control current state.
UpdateEnabled Notifies the platform browser to synchronize its enabled state with the host control.
UpdateVisible Notifies the platform browser to synchronize its visibility state with the host control.