onResourceLoadComplete

abstract fun onResourceLoadComplete(browser: CefBrowser, frame: CefFrame, request: CefRequest, response: CefResponse, status: CefURLRequest.Status, receivedContentLength: Long)

Called on the IO thread when a resource load has completed. The |browser| and |frame| values represent the source of the request, and may be null for requests originating from service workers or CefURLRequest. This method will be called for all requests, including requests that are aborted due to CEF shutdown or destruction of the associated browser. In cases where the associated browser is destroyed this callback may arrive after the CefLifeSpanHandler.onBeforeClose callback for that browser. The CefFrame.isValid method can be used to test for this situation, and care should be taken not to call |browser| or |frame| methods that modify state (like loadURL, sendProcessMessage, etc.) if the frame is invalid.

Parameters

browser

The corresponding browser.

frame

The frame generating the event. Instance only valid within the scope of this method.

request

The request itself. Cannot be modified in this callback. Instance only valid within the scope of this method.

response

The request response. Cannot be modified in this callback. Instance only valid within the scope of this method.

status

The load completion status.

receivedContentLength

The number of bytes read.