TTMSFNCEdgeWebBrowser Class
Web browser component backed by the Microsoft Edge WebView2 runtime on Windows.
API unit family: TMSFNCEdgeWebBrowser
Inherits from: TTMSFNCCustomWebBrowser
Syntax
TTMSFNCEdgeWebBrowser = class(TTMSFNCCustomWebBrowser)
Methods
| Name | Description |
|---|---|
| AddBridge | Registers a host object under the given bridge name so it can be called from JavaScript. |
| AddCookie | Adds or updates a cookie in the WebView2 cookie store. |
| CallDevToolsProtocolMethod | Calls a DevTools Protocol method with the given parameters. |
| CanGoBack | Returns True if the browser can navigate to the previous history entry. |
| CanGoForward | Returns True if the browser can navigate to the next history entry. |
| CaptureScreenShot | Captures a screenshot of the current page and delivers it via the callback. |
| ClearCache | Clears the WebView2 browser cache. |
| ClearVirtualHostNameToFolderMapping | Removes a virtual host-to-folder mapping previously set by SetVirtualHostNameToFolderMapping. |
| DeInitialize | Tears down the WebView2 host window and releases the runtime. |
| DeleteAllCookies | Deletes all cookies from the WebView2 cookie store. |
| DeleteCookie | Deletes a specific cookie from the WebView2 cookie store. |
| ExecuteJavaScript | Executes a JavaScript expression in the current page context. |
| ExecuteJavaScriptSync | Executes a JavaScript expression synchronously and returns the result as a string. |
| GetBridgeCommunicationLayer | Returns the JavaScript bridge communication script for the named bridge. |
| GetBrowserVersion | Returns the installed Edge WebView2 runtime version string. |
| GetContainsFullScreenElement | Returns True if the current page contains a full-screen element. |
| GetCookies | Retrieves cookies for the given URI and fires the OnGetCookies event. |
| GetDocumentTitle | Returns the title of the currently loaded document. |
| GetDownloadInterruptReasonText | Returns a human-readable description for the given download interrupt reason code. |
| GetDownloadStateText | Returns a human-readable description for the given download state code. |
| GetParentWindowHandle | Returns the Win32 window handle of the parent hosting window. |
| GetUserDataFolder | Returns the path of the folder where WebView2 stores user data. |
| GetWebBrowserInstance | Returns the underlying WebView2 COM interface on Windows. |
| GoBack | Navigates backward in the browser history. |
| GoForward | Navigates forward in the browser history. |
| InitialPrintSettings | Returns a default-configured print settings record for this browser. |
| Initialize | Initialises the WebView2 runtime and creates the browser host window. |
| Initialized | Called after WebView2 initialisation completes; fires the OnInitialized event. |
| IsFMXBrowser | Returns True because this implementation uses the FMX browser host. |
| LoadFile | Loads a local HTML file into the browser. |
| LoadHTML | Loads an HTML string into the browser as the current document. |
| NativeBrowser | Returns a pointer to the underlying WebView2 controller or core object. |
| NativeEnvironment | Returns a pointer to the underlying WebView2 environment object. |
| Navigate | Navigates to the URL set in the URL property. |
| NavigateWithData | Navigates to a URI and posts string body data using the given HTTP method. |
| OpenTaskManager | Opens the Edge browser task manager showing resource usage. |
| Prints the current page using the specified print settings. | |
| PrintToPDF | Saves the current page as a PDF file using the specified settings. |
| PrintToPDFStream | Renders the current page to a PDF stream using the specified settings. |
| Reload | Reloads the current page. |
| RemoveBridge | Removes a previously registered host object bridge. |
| SetVirtualHostNameToFolderMapping | Maps a virtual host name to a local folder for serving local resources via HTTPS. |
| ShowDebugConsole | Opens the Edge DevTools console window. |
| ShowPrintUI | Opens the browser's built-in print dialog. |
| StartDocumentReadyStateThread | Starts the background thread that polls for the document ready state. |
| StopLoading | Cancels any ongoing navigation or page load. |
| SubscribeDevtools | Subscribes to a DevTools Protocol event by name. |