From f01e3c849d199e540811af16f2a2a8db6d61cba8 Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Wed, 10 Feb 2021 02:35:07 +0100 Subject: [PATCH] updated iosOnNavigationResponse docs --- README.md | 2 +- lib/src/webview.dart | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e1ffa9be..7eb05be7 100755 --- a/README.md +++ b/README.md @@ -719,7 +719,7 @@ Event names that starts with `android` or `ios` are events platform-specific. * `androidOnReceivedLoginRequest`: Event fired when a request to automatically log in the user has been processed (available only on Android). * `iosOnWebContentProcessDidTerminate`: Invoked when the web view's web content process is terminated (available only on iOS). * `iosOnDidReceiveServerRedirectForProvisionalNavigation`: Called when a web view receives a server redirect (available only on iOS). -* `iosOnNavigationResponse`: Called when a web view asks for permission to navigate to new content after the response to the navigation request is known (available only on iOS). +* `iosOnNavigationResponse`: Called when a web view asks for permission to navigate to new content after the response to the navigation request is known (available only on iOS). To use this event, the `useOnNavigationResponse` iOS-specific option must be `true`. * `iosShouldAllowDeprecatedTLS`: Called when a web view asks whether to continue with a connection that uses a deprecated version of TLS (v1.0 and v1.1) (available only on iOS). ### `ContextMenu` class diff --git a/lib/src/webview.dart b/lib/src/webview.dart index a2220735..cce7afb6 100644 --- a/lib/src/webview.dart +++ b/lib/src/webview.dart @@ -608,7 +608,8 @@ abstract class WebView { /// ///[navigationResponse] represents the navigation response. /// - ///**NOTE**: available only on iOS. + ///**NOTE**: available only on iOS. In order to be able to listen this event, you need to set [IOSInAppWebViewOptions.useOnNavigationResponse] option to `true`. + /// /// ///**Official iOS API**: https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview final Future Function(InAppWebViewController controller,