diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 3576e27d..e195666a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -16,15 +16,6 @@
-
-
-
-
-
-
-
-
-
@@ -47,8 +38,8 @@
-
-
+
+
@@ -56,11 +47,11 @@
-
+
-
-
+
+
@@ -71,7 +62,7 @@
-
+
@@ -83,7 +74,7 @@
-
+
@@ -95,7 +86,7 @@
-
+
@@ -104,7 +95,7 @@
-
+
@@ -113,11 +104,11 @@
-
+
-
-
+
+
@@ -236,10 +227,10 @@
-
+
@@ -494,7 +485,6 @@
-
@@ -507,7 +497,7 @@
-
+
@@ -515,7 +505,7 @@
-
+
@@ -746,43 +736,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -790,17 +743,10 @@
-
-
-
-
-
-
-
-
-
+
+
@@ -809,14 +755,58 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Classes/InAppWebView.swift b/ios/Classes/InAppWebView.swift
index 34d76330..3b41d413 100755
--- a/ios/Classes/InAppWebView.swift
+++ b/ios/Classes/InAppWebView.swift
@@ -463,7 +463,7 @@ let interceptNavigationStateChangeJS = """
return function pushState(){
var ret = f.apply(this, arguments);
window.dispatchEvent(new Event('pushstate'));
- window.dispatchEvent(new Event('locationchange'));
+ window.dispatchEvent(new Event('_flutter_inappbrowser_locationchange'));
return ret;
};
})(history.pushState);
@@ -471,14 +471,14 @@ let interceptNavigationStateChangeJS = """
return function replaceState(){
var ret = f.apply(this, arguments);
window.dispatchEvent(new Event('replacestate'));
- window.dispatchEvent(new Event('locationchange'));
+ window.dispatchEvent(new Event('_flutter_inappbrowser_locationchange'));
return ret;
};
})(history.replaceState);
window.addEventListener('popstate',function() {
- window.dispatchEvent(new Event('locationchange'));
+ window.dispatchEvent(new Event('_flutter_inappbrowser_locationchange'));
});
- window.addEventListener('locationchange', function() {
+ window.addEventListener('_flutter_inappbrowser_locationchange', function() {
window.webkit.messageHandlers["onNavigationStateChange"].postMessage(JSON.stringify({
url: document.location.href
}));
diff --git a/lib/src/in_app_webview.dart b/lib/src/in_app_webview.dart
index 6485b25d..db5625ec 100755
--- a/lib/src/in_app_webview.dart
+++ b/lib/src/in_app_webview.dart
@@ -16,7 +16,7 @@ import 'types.dart';
import 'in_app_browser.dart';
import 'webview_options.dart';
-const javaScriptHandlersNameForbidden = ["onLoadResource", "shouldInterceptAjaxRequest", "onAjaxReadyStateChange", "onAjaxEvent"];
+const javaScriptHandlerForbiddenNames = ["onLoadResource", "shouldInterceptAjaxRequest", "onAjaxReadyStateChange", "onAjaxProgress", "shouldInterceptFetchRequest"];
///InAppWebView Widget class.
///
@@ -1144,7 +1144,7 @@ class InAppWebViewController {
/// """);
///```
void addJavaScriptHandler(String handlerName, JavaScriptHandlerCallback callback) {
- assert(!javaScriptHandlersNameForbidden.contains(handlerName));
+ assert(!javaScriptHandlerForbiddenNames.contains(handlerName));
this.javaScriptHandlersMap[handlerName] = (callback);
}