diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1c02934b..fe5354b2 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -16,15 +16,8 @@
-
-
-
-
-
-
+
-
-
@@ -75,7 +68,7 @@
-
+
@@ -83,8 +76,8 @@
-
-
+
+
@@ -92,6 +85,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -116,10 +121,6 @@
- InAppWebViewOnScrollChangedTest
- for Android
- an re
- only for Android.isOpenedinitialScalee spinner when the WebView is loading a page. The default value i
@@ -140,12 +141,16 @@
'action': this.action: this.actionthis.
- onPermissionRequest
- Event firedEvent firesonSafeResponse({onPermission
+ onPermissionRequest
+ Event fired
+ [InAppBrowser] web
+ WebView
+ [InAppBrowser]
+ Event firedactivity.getPreferences(0)
@@ -203,18 +208,18 @@
-
-
+
+
@@ -768,16 +773,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -913,13 +908,6 @@
-
-
-
-
-
-
-
@@ -941,23 +929,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -970,6 +941,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/src/in_app_browser.dart b/lib/src/in_app_browser.dart
index d3a3bbdb..c5cda046 100644
--- a/lib/src/in_app_browser.dart
+++ b/lib/src/in_app_browser.dart
@@ -420,7 +420,7 @@ class InAppBrowser {
}
- ///Event fired when the webview notifies that a loading URL has been flagged by Safe Browsing.
+ ///Event fired when the WebView notifies that a loading URL has been flagged by Safe Browsing.
///The default behavior is to show an interstitial to the user, with the reporting checkbox visible.
///
///[url] represents the url of the request.
@@ -517,7 +517,7 @@ class InAppBrowser {
}
- ///Event fired when the navigation state of the [InAppWebView] changes throught the usage of
+ ///Event fired when the navigation state of the WebView changes throught the usage of
///javascript **[History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API)** functions (`pushState()`, `replaceState()`) and `onpopstate` event.
///
///Also, the event is fired when the javascript `window.location` changes without reloading the webview (for example appending or modifying an hash to the url).
@@ -527,6 +527,17 @@ class InAppBrowser {
}
+ ///Event fired when the WebView is requesting permission to access the specified resources and the permission currently isn't granted or denied.
+ ///
+ ///[origin] represents the origin of the web page which is trying to access the restricted resources.
+ ///
+ ///[resources] represents the array of resources the web content wants to access.
+ ///
+ ///**NOTE**: available only on Android 23+.
+ Future onPermissionRequest(String origin, List resources) {
+
+ }
+
void throwIsAlreadyOpened({String message = ''}) {
if (this.isOpened()) {
throw Exception(['Error: ${ (message.isEmpty) ? '' : message + ' '}The browser is already opened.']);
diff --git a/lib/src/in_app_webview.dart b/lib/src/in_app_webview.dart
index 3a2bf77f..c299abf4 100755
--- a/lib/src/in_app_webview.dart
+++ b/lib/src/in_app_webview.dart
@@ -214,7 +214,7 @@ class InAppWebView extends StatefulWidget {
///[url] represents the new url.
final void Function(InAppWebViewController controller, String url) onNavigationStateChange;
- ///Event fired when the webview is requesting permission to access the specified resources and the permission currently isn't granted or denied.
+ ///Event fired when the WebView is requesting permission to access the specified resources and the permission currently isn't granted or denied.
///
///[origin] represents the origin of the web page which is trying to access the restricted resources.
///
@@ -596,8 +596,8 @@ class InAppWebViewController {
List resources = call.arguments["resources"].cast();
if (_widget != null && _widget.onPermissionRequest != null)
return (await _widget.onPermissionRequest(this, origin, resources))?.toMap();
- /*else if (_inAppBrowser != null)
- return (await _inAppBrowser.onPermissionRequest(origin, resources))?.toMap();*/
+ else if (_inAppBrowser != null)
+ return (await _inAppBrowser.onPermissionRequest(origin, resources))?.toMap();
break;
case "onCallJsHandler":
String handlerName = call.arguments["handlerName"];