|control||WebView2||MBS WinFrameworks Plugin||20.5||❌ No||✅ Yes||❌ No||❌ No||Desktop only|
|Read about WebView2 control here:|
There you also fine the installers needed to install it, unless you have the 2021 version of Windows, which may include it preinstalled.
If you use this control on macOS and Linux, it will do nothing.
On Windows if the control fails to initialize, the Opened event will not fire.
But if it fires, it will be some time after the open event fired as initialization is asynchronous.
If you call LoadURL, LoadHTML or set URL property too early, we cache that and perform the action later when the web viewer is initialized properly.
If you add an event, we register it with the C++ control. So if you don't specify an event, you may get the default behavior.
- 21 events
- event CapturePreviewCompleted(ImageFormat as Integer, ErrorCode as Integer, PictureData as String)
- event Configure
- event ContainsFullScreenElementChanged
- event ContentLoading(isErrorPage as Boolean, NavigationID as UInt64)
- event DocumentTitleChanged
- event FrameNavigationCompleted(isSuccess as Boolean, ErrorStatus as Integer, NavigationID as UInt64)
- event FrameNavigationStarting(URL as String, IsUserInitiated as Boolean, IsRedirected as Boolean, NavigationID as UInt64) as Boolean
- event GotFocus
- event HistoryChanged
- event LostFocus
- event NavigationCompleted(isSuccess as Boolean, ErrorStatus as Integer, NavigationID as UInt64)
- event NavigationStarting(URL as String, IsUserInitiated as Boolean, IsRedirected as Boolean, NavigationID as UInt64) as Boolean
- event Opened
- event PermissionRequested(URL as String, PermissionKind as Integer, IsUserInitiated as Boolean, byref State as Integer)
- event ProcessFailed(processFailedKind as Integer)
- event SourceChanged(isNewDocument as Boolean)
- event WebMessageReceived(Source as String, webMessageAsJson as String, webMessageAsString as String)
- event WindowCloseRequested
- event ZoomFactorChanged
- 19 properties
- property AdditionalBrowserArguments as String
- property AllowSingleSignOnUsingOSPrimaryAccount 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 DocumentTitle as String
- property IsBuiltInErrorPageEnabled as Boolean
- property IsScriptEnabled as Boolean
- property IsStatusBarEnabled as Boolean
- property IsWebMessageEnabled as Boolean
- property IsZoomControlEnabled as Boolean
- property Language as String
- property ProcessID as Integer
- property TargetCompatibleBrowserVersion as String
- property URL as String
- property ZoomFactor as Double
- 20 methods
- method AddWebResourceRequestedFilter(URL as String, resourceType as Integer)
- method CanGoBack as Boolean
- method CanGoForward as Boolean
- method CapturePreview(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 PlainText as String
- method PostWebMessageAsJson(webMessageAsJson as String)
- method PostWebMessageAsString(webMessageAsString as String)
- method Reload
- method RemoveScriptToExecuteOnDocumentCreated(ID as String
- method RemoveWebResourceRequestedFilter(URL as String, resourceType as Integer)
- method Stop
- shared method AvailableCoreWebView2BrowserVersionString as string
- 49 constants
Permission to capture video.
Permission to read system clipboard without a user gesture.
Permission to access geolocation.
Permission to capture audio.
Permission to send web notifications.
Permission to access generic sensor.
Grant the permission request.
Use default browser behavior, which normally prompt users for decision.
Deny the permission request.
Process Failure Kinds
Indicates the browser process terminated unexpectedly.
Indicates the render process terminated unexpectedly.
Indicates the render process becomes unresponsive.
Error Status Values
Cannot connect to destination.
The SSL certificate common name does not match the web address.
The SSL certificate has expired.
The SSL certificate is invalid – this could mean the certificate did not match the public key pins for the host name, the certificate is signed by an untrusted authority or using a weak sign algorithm, the certificate claimed DNS names violate name constraints, the certificate contains a weak key, the certificate's validity period is too long, lack of revocation information or revocation mechanism, non-unique host name, lack of certificate transparency information, or the certificate is chained to a legacy Symantec root.
The SSL certificate has been revoked.
The SSL client certificate contains errors.
The connection was aborted.
The connection was reset.
The Internet connection has been lost.
The server returned an invalid or unrecognized response.
Could not resolve provided host name.
The operation was canceled.
The request redirect failed.
The host is unreachable.
The connection has timed out.
An unexpected error occurred.
An unknown error occurred.
Web Resource Context
CSP Violation Reports.
EventSource API communication.
Fetch API communication.
Web App Manifests.
Other media resources such as videos.
Signed HTTP Exchanges.
WebSocket API communication.
XML HTTP requests.
Some examples which use this control:
- MonkeyBread Software Releases the MBS Xojo Plugins in version 21.1
- MBS Xojo Plugins, version 21.1pr7
- MonkeyBread Software Releases the MBS Xojo Plugins in version 21.0
- MBS Xojo Plugins, version 20.6pr1
- MBS Xojo Plugins in version 20.5
- MBS Xojo Plugins, version 20.5pr8
- MBS Xojo Plugins, version 20.5pr7
- WebView2 for Xojo
Xojo Developer Magazine
The items on this page are in the following plugins: MBS WinFrameworks Plugin.
MBS Xojo Plugins