ResourceRequestHandler.OnBeforeResourceLoad Method (original) (raw)

ResourceRequestHandlerOnBeforeResourceLoad Method

Version 118.6.80

Called on the CEF IO thread before a resource request is loaded. To redirect or change the resource load optionally modifyrequest. Modification of the request URL will be treated as a redirect.

Namespace: CefSharp.Handler
Assembly: CefSharp (in CefSharp.dll) Version: 118.6.80.0 (118.6.80.0)

Syntax

protected virtual CefReturnValue OnBeforeResourceLoad( IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback )

protected: virtual CefReturnValue OnBeforeResourceLoad( IWebBrowser^ chromiumWebBrowser, IBrowser^ browser, IFrame^ frame, IRequest^ request, IRequestCallback^ callback )

Parameters

chromiumWebBrowser

Type: CefSharpIWebBrowser
The ChromiumWebBrowser control.

browser

Type: CefSharpIBrowser
the browser object - may be null if originating from ServiceWorker or CefURLRequest.

frame

Type: CefSharpIFrame
the frame object - may be null if originating from ServiceWorker or CefURLRequest.

request

Type: CefSharpIRequest
the request object - can be modified in this callback.

callback

Type: CefSharpIRequestCallback
Callback interface used for asynchronous continuation of url requests.

Return Value

Type: CefReturnValue
Return Continue to continue the request immediately. ReturnContinueAsync and call Continue(Boolean) orCancel at a later time to continue or the cancel the request asynchronously. ReturnCancel to cancel the request immediately.

See Also

Reference