Platforms to show: All Mac Windows Linux Cross-Platform
WebView2BrowserMBS class New in 26.3
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| class | WebView2 | MBS WinFrameworks Plugin | 26.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
The WebView2BrowserMBS class allows you to use the same methods for both WebView2ControlMBS and a Xojo HTMLViewer using WebView2.
- 32 properties
- property areBrowserAcceleratorKeysEnabled as Boolean
- property AreDefaultContextMenusEnabled as Boolean
- property AreDefaultScriptDialogsEnabled as Boolean
- property AreDevToolsEnabled as Boolean
- property AreHostObjectsAllowed as Boolean
- property BrowserVersionString as String
- property ContainsFullScreenElement as Boolean
- property CookieManager as WebView2BrowserMBS
- property DefaultDownloadFolderPath as String
- property DocumentTitle as String
- property FaviconURI as String
- property Handle as Integer
- property HiddenPdfToolbarItems as Integer
- property IsBuiltInErrorPageEnabled as Boolean
- property IsDocumentPlayingAudio as Boolean
- property IsGeneralAutofillEnabled as Boolean
- property IsInPrivateModeEnabled as Boolean
- property IsMuted as Boolean
- property IsPasswordAutosaveEnabled as Boolean
- property IsPinchZoomEnabled as Boolean
- property IsScriptEnabled as Boolean
- property IsStatusBarEnabled as Boolean
- property IsSwipeNavigationEnabled as Boolean
- property IsWebMessageEnabled as Boolean
- property IsZoomControlEnabled as Boolean
- property MemoryUsageTargetLevel as Integer
- property PreferredColorScheme as Integer
- property ProcessID as Integer
- property ProfilePath as String
- property SettingsHandle as Integer
- property URL as String
- property UserAgent as String
- 32 methods
- method AddBrowserExtension(extensionFolderPath as String, theDelegate as AddBrowserExtensionCompletedMBS = nil)
- method AddScriptToExecuteOnDocumentCreated(JavaScript as String, theDelegate as AddScriptToExecuteOnDocumentCreatedCompletedMBS = nil)
- method AddWebResourceRequestedFilter(URL as String, resourceType as Integer)
- method CanGoBack as Boolean
- method CanGoForward as Boolean
- method CapturePreview(theDelegate as CapturePreviewCompletedMBS, ImageFormat as Integer = 0)
- method ClearSelection
- method ClearVirtualHostNameToFolderMapping(hostName as String)
- method Copy
- method CreatePrintSettings as WebView2PrintSettingsMBS
- method Cut
- method ExecuteScript(JavaScript as String, theDelegate as ExecuteScriptCompletedMBS = nil)
- method ExecuteScriptSync(JavaScript as String, byref ErrorCode as Integer) as String
- method GetFavicon(theDelegate as FaviconCompletedMBS, ImageFormat as Integer = 0)
- method GoBack
- method GoForward
- method HTMLText as String
- method LoadHTML(HTML as String)
- method LoadURL(URL as String)
- method OpenDevToolsWindow
- method Paste
- method PlainText as String
- method PostWebMessageAsJson(webMessageAsJson as String)
- method PostWebMessageAsString(webMessageAsString as String)
- method Print
- method PrintToPdf(Path as String, PrintSettings as WebView2PrintSettingsMBS = nil, theDelegate as PrintCompletedMBS = nil)
- method Reload
- method RemoveScriptToExecuteOnDocumentCreated(ID as String
- method RemoveWebResourceRequestedFilter(URL as String, resourceType as Integer)
- method SelectAll
- method SetVirtualHostNameToFolderMapping(hostName as String, folderPath as String, accessKind as Integer)
- method Stop
- 6 delegates
- delegate AddBrowserExtensionCompletedMBS(Browser as WebView2BrowserMBS, extensionFolderPath as String, errorCode as Integer)
- delegate AddScriptToExecuteOnDocumentCreatedCompletedMBS(Browser as WebView2BrowserMBS, JavaScript as String, ErrorCode as Integer, ID as String)
- delegate CapturePreviewCompletedMBS(Browser as WebView2BrowserMBS, ImageFormat as Integer, ErrorCode as Integer, PictureData as String)
- delegate ExecuteScriptCompletedMBS(Browser as WebView2BrowserMBS, JavaScript as String, ErrorCode as Integer, resultObjectAsJson as String)
- delegate FaviconCompletedMBS(Browser as WebView2BrowserMBS, ImageFormat as Integer, ErrorCode as Integer, PictureData as String)
- delegate PrintCompletedMBS(Browser as WebView2BrowserMBS, Path as String, errorCode as Integer, isSuccessful as boolean)
- 6 constants
Image Formats
| Constant | Value | Description |
|---|---|---|
| kCapturePreviewImageFormatJPEG | 1 |
JPEG format. |
| kCapturePreviewImageFormatPNG | 0 |
PNG format. |
Favicon Image Format
| Constant | Value | Description |
|---|---|---|
| kFaviconImageFormatJPEG | 1 |
JPEG format |
| kFaviconImageFormatPNG | 0 |
PNG format |
Memory Usage Target Levels
| Constant | Value | Description |
|---|---|---|
| kMemoryUsageTargetLevelLow | 1 |
Reduced memory usage. |
| kMemoryUsageTargetLevelNormal | 0 |
Normal usage levels. |
This class has no sub classes.
Blog Entries
Release notes
- Version 26.3
- Added WebView2BrowserMBS method to HTMLViewer class.
- Added WebView2BrowserMBS class.
Some methods using this class:
- DesktopHTMLViewer.WebView2BrowserMBS as WebView2BrowserMBS
- HTMLViewer.WebView2BrowserMBS as WebView2BrowserMBS
Some properties using for this class:
- DesktopWebView2ControlMBS.Browser as WebView2BrowserMBS
- WebView2BrowserMBS.CookieManager as WebView2BrowserMBS
- WebView2ControlMBS.Browser as WebView2BrowserMBS
Some related classes:
The items on this page are in the following plugins: MBS WinFrameworks Plugin.
WakeNotifierMBS - WebView2CookieManagerMBS