useShouldInterceptAjaxRequest property

bool? useShouldInterceptAjaxRequest
getter/setter pair

Set to true to be able to listen at the PlatformWebViewCreationParams.shouldInterceptAjaxRequest event.

Due to the async nature of PlatformWebViewCreationParams.shouldInterceptAjaxRequest event implementation, it will intercept only async XMLHttpRequests (AjaxRequest.isAsync with true). To be able to intercept sync XMLHttpRequests, use InAppWebViewSettings.interceptOnlyAsyncAjaxRequests to false.

If the PlatformWebViewCreationParams.shouldInterceptAjaxRequest event or any other Ajax event is implemented and this value is null, it will be automatically inferred as true, otherwise, the default value is false. This logic will not be applied for PlatformInAppBrowser, where you must set the value manually.

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • MacOS

Implementation

bool? useShouldInterceptAjaxRequest;