Platforms to show: All Mac Windows Linux Cross-Platform

Back to WebView2ControlMBS control.

Previous items

WebView2ControlMBS.SourceChanged(isNewDocument as Boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event WebView2 MBS WinFrameworks Plugin 20.5 ❌ No ✅ Yes ❌ No ❌ No
The event to report a change in the URL.

SourceChanged fires when the Source property changes. SourceChanged fires for navigating to a different site or fragment navigations. It will not fire for other types of navigations such as page reloads or history.pushState with the same URL as the current page. SourceChanged fires before ContentLoading for navigation to a new document.

WebView2ControlMBS.WebMessageReceived(Source as String, webMessageAsJson as String, webMessageAsString as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event WebView2 MBS WinFrameworks Plugin 20.5 ❌ No ✅ Yes ❌ No ❌ No
The event called for a web message.

WebMessageReceived fires when the IsWebMessageEnabled setting is set and the top level document of the WebView calls window.chrome.webview.postMessage. The postMessage function is void postMessage(object) where object is any object supported by JSON conversion.

webMessageAsString is empty if we can't serialize it to text.

WebView2ControlMBS.WindowCloseRequested

Type Topic Plugin Version macOS Windows Linux iOS Targets
event WebView2 MBS WinFrameworks Plugin 20.5 ❌ No ✅ Yes ❌ No ❌ No
The event where JavaScript asks to close window.

WindowCloseRequested fires when content inside the WebView requested to close the window, such as after window.close is called. The app should close the WebView and related app window if that makes sense to the app.

WebView2ControlMBS.ZoomFactorChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
event WebView2 MBS WinFrameworks Plugin 20.5 ❌ No ✅ Yes ❌ No ❌ No
ZoomFactorChanged fires when the ZoomFactor property of the WebView changes.

The event could fire because the caller modified the ZoomFactor property, or due to the user manually modifying the zoom. When it is modified by the caller via the ZoomFactor property, the internal zoom factor is updated immediately and there will be no ZoomFactorChanged event. WebView associates the last used zoom factor for each site. Therefore, it is possible for the zoom factor to change when navigating to a different page. When the zoom factor changes due to this, the ZoomFactorChanged event fires right after the ContentLoading event.

Previous items

The items on this page are in the following plugins: MBS WinFrameworks Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...