Interface IWebClient
interface IWebClient
Extends com.amazon.apmf.IStandard
HeadlessWebRuntime Client callback interface provides way for clients to listen
for status updates and override HeadlessWebRuntime behavior.
Methods
onLoadStarted()
Notify the host application when the page loading started.voidonLoadStarted(stringurl)
Parameters
url
string — Required
onLoadFinished()
Notify the host application when the page loading finished.voidonLoadFinished(stringurl)
Parameters
url
string — Required
shouldOverrideWebRequest()
Provides chance for host application to allow/deny the page navigations. Note that this callback comes only for main frame navigation requests and not for sub frames or sub resources (for ex: image, scripts etc..) By default navigations are canceled.boolshouldOverrideWebRequest(WebRequest*request)
Parameters
request
WebRequest* — Required
Web Request object that contains request information.
Returns
bool
bool true to cancel the current loading, false otherwise
onReceivedError()
Notifies the host application on web resource loading errors. This will be called for all resources - images/iframes/main page.voidonReceivedError(WebRequestError*error)
Parameters
error
WebRequestError* — Required
Web request error object contains error information.

