Click or drag to resize

FrameHandlerOnMainFrameChanged Method

Version 94.4.20
Called when the main frame changes due to one of the following: - (a) initial browser creation - (b) final browser destruction - (c) cross-origin navigation - (d) re-navigation after renderer process termination (due to crashes, etc). oldFrame will be null and newFrame will be non-null when a main frame is assigned to browser for the first time. oldFrame will be non-null and newFrame will be null when a main frame is removed from browser for the last time. Both oldFrame and newFrame will be non-nullfor cross-origin navigations or re-navigation after renderer process termination. This method will be called after OnFrameCreated(IWebBrowser, IBrowser, IFrame) for newFrame and/or after OnFrameDetached(IWebBrowser, IBrowser, IFrame) for oldFrame. If called after OnBeforeClose(IWebBrowser, IBrowser) during browser destruction then IsValid will return false for browser.

Namespace:  CefSharp.Handler
Assembly:  CefSharp (in CefSharp.dll) Version: 94.4.20.0 (94.4.20.0)
Syntax
protected virtual void OnMainFrameChanged(
	IWebBrowser chromiumWebBrowser,
	IBrowser browser,
	IFrame oldFrame,
	IFrame newFrame
)

Parameters

chromiumWebBrowser
Type: CefSharpIWebBrowser
the ChromiumWebBrowser control
browser
Type: CefSharpIBrowser
the browser object
oldFrame
Type: CefSharpIFrame
the old frame object
newFrame
Type: CefSharpIFrame
the new frame object
See Also