Skip to content

Commit 1e7091c

Browse files
Merge branch 'v6.2.0-beta.3'
2 parents 20782d6 + d8f7484 commit 1e7091c

File tree

33 files changed

+429
-129
lines changed

33 files changed

+429
-129
lines changed

flutter_inappwebview/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
- `flutter_inappwebview_macos`: `^1.2.0-beta.2` -> `^1.2.0-beta.3`
88
- `flutter_inappwebview_web`: `^1.2.0-beta.2` -> `^1.2.0-beta.3`
99
- `flutter_inappwebview_windows`: `^0.7.0-beta.2` -> `^0.7.0-beta.3`
10+
- Fixed "When useShouldInterceptAjaxRequest is true, some ajax requests doesn't work" [#2197](https://github.com/pichillilorenzo/flutter_inappwebview/issues/2197)
1011

1112
#### Platform Interface
1213
- Added `saveState`, `restoreState` methods to `PlatformInAppWebViewController` class
14+
- Added `useOnAjaxReadyStateChange`, `useOnAjaxProgress` properties to `InAppWebViewSettings`
1315

1416
#### Android Platform
1517
- Implemented `saveState`, `restoreState` InAppWebViewController methods

flutter_inappwebview/lib/src/in_app_webview/headless_in_app_webview.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class HeadlessInAppWebView {
8686
@Deprecated('Use onNavigationResponse instead')
8787
FutureOr<IOSNavigationResponseAction?> Function(InAppWebViewController controller, IOSWKNavigationResponse navigationResponse)? iosOnNavigationResponse,
8888
@Deprecated('Use shouldAllowDeprecatedTLS instead') FutureOr<IOSShouldAllowDeprecatedTLSAction?> Function(InAppWebViewController controller, URLAuthenticationChallenge challenge)? iosShouldAllowDeprecatedTLS,
89-
FutureOr<AjaxRequestAction> Function(InAppWebViewController controller, AjaxRequest ajaxRequest)? onAjaxProgress,
89+
FutureOr<AjaxRequestAction?> Function(InAppWebViewController controller, AjaxRequest ajaxRequest)? onAjaxProgress,
9090
FutureOr<AjaxRequestAction?> Function(InAppWebViewController controller, AjaxRequest ajaxRequest)? onAjaxReadyStateChange,
9191
void Function(InAppWebViewController controller, ConsoleMessage consoleMessage)? onConsoleMessage,
9292
FutureOr<bool?> Function(InAppWebViewController controller, CreateWindowAction createWindowAction)? onCreateWindow,

flutter_inappwebview/lib/src/in_app_webview/in_app_webview.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class InAppWebView extends StatefulWidget {
8686
@Deprecated('Use onNavigationResponse instead')
8787
FutureOr<IOSNavigationResponseAction?> Function(InAppWebViewController controller, IOSWKNavigationResponse navigationResponse)? iosOnNavigationResponse,
8888
@Deprecated('Use shouldAllowDeprecatedTLS instead') FutureOr<IOSShouldAllowDeprecatedTLSAction?> Function(InAppWebViewController controller, URLAuthenticationChallenge challenge)? iosShouldAllowDeprecatedTLS,
89-
FutureOr<AjaxRequestAction> Function(InAppWebViewController controller, AjaxRequest ajaxRequest)? onAjaxProgress,
89+
FutureOr<AjaxRequestAction?> Function(InAppWebViewController controller, AjaxRequest ajaxRequest)? onAjaxProgress,
9090
FutureOr<AjaxRequestAction?> Function(InAppWebViewController controller, AjaxRequest ajaxRequest)? onAjaxReadyStateChange,
9191
void Function(InAppWebViewController controller, ConsoleMessage consoleMessage)? onConsoleMessage,
9292
FutureOr<bool?> Function(InAppWebViewController controller, CreateWindowAction createWindowAction)? onCreateWindow,

flutter_inappwebview_android/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- Updated flutter_inappwebview_platform_interface version to ^1.4.0-beta.3
44
- Implemented `saveState`, `restoreState` InAppWebViewController methods
55
- Merged "Android: implemented PlatformPrintJobController.onComplete" [#2216](https://github.com/pichillilorenzo/flutter_inappwebview/pull/2216) (thanks to [Doflatango](https://github.com/Doflatango))
6+
- Fixed "When useShouldInterceptAjaxRequest is true, some ajax requests doesn't work" [#2197](https://github.com/pichillilorenzo/flutter_inappwebview/issues/2197)
67

78
## 1.2.0-beta.2
89

flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/plugin_scripts_js/InterceptAjaxRequestJS.java

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,33 @@
1010
public class InterceptAjaxRequestJS {
1111

1212
public static final String INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT_GROUP_NAME = "IN_APP_WEBVIEW_INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT";
13+
1314
public static String FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE() {
1415
return
1516
JavaScriptBridgeJS.get_JAVASCRIPT_BRIDGE_NAME() + "._useShouldInterceptAjaxRequest";
1617
}
18+
19+
public static String FLAG_VARIABLE_FOR_ON_AJAX_READY_STATE_CHANGE() {
20+
return JavaScriptBridgeJS.get_JAVASCRIPT_BRIDGE_NAME() + "._useOnAjaxReadyStateChange";
21+
}
22+
23+
public static String FLAG_VARIABLE_FOR_ON_AJAX_PROGRESS() {
24+
return JavaScriptBridgeJS.get_JAVASCRIPT_BRIDGE_NAME() + "._useOnAjaxProgress";
25+
}
26+
1727
public static String FLAG_VARIABLE_FOR_INTERCEPT_ONLY_ASYNC_AJAX_REQUESTS_JS_SOURCE() {
1828
return
1929
JavaScriptBridgeJS.get_JAVASCRIPT_BRIDGE_NAME() + "._interceptOnlyAsyncAjaxRequests";
2030
}
31+
2132
public static PluginScript INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT(@Nullable Set<String> allowedOriginRules,
22-
boolean forMainFrameOnly) {
33+
boolean forMainFrameOnly,
34+
boolean initialUseOnAjaxReadyStateChange,
35+
boolean initialUseOnAjaxProgress) {
2336
return
2437
new PluginScript(
2538
InterceptAjaxRequestJS.INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT_GROUP_NAME,
26-
InterceptAjaxRequestJS.INTERCEPT_AJAX_REQUEST_JS_SOURCE(),
39+
InterceptAjaxRequestJS.INTERCEPT_AJAX_REQUEST_JS_SOURCE(initialUseOnAjaxReadyStateChange, initialUseOnAjaxProgress),
2740
UserScriptInjectionTime.AT_DOCUMENT_START,
2841
null,
2942
true,
@@ -35,7 +48,7 @@ public static PluginScript INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT(@Nullable Set
3548
public static PluginScript createInterceptOnlyAsyncAjaxRequestsPluginScript(boolean onlyAsync) {
3649
return new PluginScript(
3750
InterceptAjaxRequestJS.INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT_GROUP_NAME,
38-
"window." + FLAG_VARIABLE_FOR_INTERCEPT_ONLY_ASYNC_AJAX_REQUESTS_JS_SOURCE() + " = " + onlyAsync +";",
51+
"window." + FLAG_VARIABLE_FOR_INTERCEPT_ONLY_ASYNC_AJAX_REQUESTS_JS_SOURCE() + " = " + onlyAsync + ";",
3952
UserScriptInjectionTime.AT_DOCUMENT_START,
4053
null,
4154
true,
@@ -44,11 +57,13 @@ public static PluginScript createInterceptOnlyAsyncAjaxRequestsPluginScript(bool
4457
);
4558
}
4659

47-
public static String INTERCEPT_AJAX_REQUEST_JS_SOURCE() {
60+
public static String INTERCEPT_AJAX_REQUEST_JS_SOURCE(boolean initialUseOnAjaxReadyStateChange, boolean initialUseOnAjaxProgress) {
4861
return
4962
"(function(ajax) {" +
5063
" var w = (window.top == null || window.top === window) ? window : window.top;" +
5164
" w." + FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE() + " = true;" +
65+
" w." + FLAG_VARIABLE_FOR_ON_AJAX_READY_STATE_CHANGE() + " = " + initialUseOnAjaxReadyStateChange + ";" +
66+
" w." + FLAG_VARIABLE_FOR_ON_AJAX_PROGRESS() + " = " + initialUseOnAjaxProgress + ";" +
5267
" var send = ajax.prototype.send;" +
5368
" var open = ajax.prototype.open;" +
5469
" var setRequestHeader = ajax.prototype.setRequestHeader;" +
@@ -98,8 +113,11 @@ public static String INTERCEPT_AJAX_REQUEST_JS_SOURCE() {
98113
" setRequestHeader.call(this, header, value);" +
99114
" };" +
100115
" function handleEvent(e) {" +
101-
" var self = this;" +
102116
" var w = (window.top == null || window.top === window) ? window : window.top;" +
117+
" if (w." + FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE() + " === false || w." + FLAG_VARIABLE_FOR_ON_AJAX_PROGRESS() + " == null || w." + FLAG_VARIABLE_FOR_ON_AJAX_PROGRESS() + " === false) {" +
118+
" return;" +
119+
" }" +
120+
" var self = this;" +
103121
" if (w." + FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE() + " == null || w." + FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE() + " == true) {" +
104122
" var headers = this.getAllResponseHeaders();" +
105123
" var responseHeaders = {};" +
@@ -154,9 +172,9 @@ public static String INTERCEPT_AJAX_REQUEST_JS_SOURCE() {
154172
" var w = (window.top == null || window.top === window) ? window : window.top;" +
155173
" var canBeIntercepted = self._flutter_inappwebview_isAsync || w." + FLAG_VARIABLE_FOR_INTERCEPT_ONLY_ASYNC_AJAX_REQUESTS_JS_SOURCE() + " === false;" +
156174
" if (canBeIntercepted && (w." + FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE() + " == null || w." + FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE() + " == true)) {" +
157-
" if (!this._flutter_inappwebview_already_onreadystatechange_wrapped) {" +
175+
" if (w." + FLAG_VARIABLE_FOR_ON_AJAX_READY_STATE_CHANGE() + " === true && !this._flutter_inappwebview_already_onreadystatechange_wrapped) {" +
158176
" this._flutter_inappwebview_already_onreadystatechange_wrapped = true;" +
159-
" var onreadystatechange = this.onreadystatechange;" +
177+
" var realOnreadystatechange = this.onreadystatechange;" +
160178
" this.onreadystatechange = function() {" +
161179
" var w = (window.top == null || window.top === window) ? window : window.top;" +
162180
" if (w." + FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE() + " == null || w." + FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE() + " == true) {" +
@@ -198,13 +216,13 @@ public static String INTERCEPT_AJAX_REQUEST_JS_SOURCE() {
198216
" return;" +
199217
" };" +
200218
" }" +
201-
" if (onreadystatechange != null) {" +
202-
" onreadystatechange();" +
219+
" if (realOnreadystatechange != null) {" +
220+
" realOnreadystatechange();" +
203221
" }" +
204222
" });" +
205223
" });" +
206-
" } else if (onreadystatechange != null) {" +
207-
" onreadystatechange();" +
224+
" } else if (realOnreadystatechange != null) {" +
225+
" realOnreadystatechange();" +
208226
" }" +
209227
" };" +
210228
" }" +

flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/webview/in_app_webview/InAppWebView.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,11 @@ public void prepareAndAddUserScripts() {
614614
interceptOnlyAsyncAjaxRequestsPluginScript = InterceptAjaxRequestJS.createInterceptOnlyAsyncAjaxRequestsPluginScript(customSettings.interceptOnlyAsyncAjaxRequests);
615615
if (customSettings.useShouldInterceptAjaxRequest) {
616616
userContentController.addPluginScript(interceptOnlyAsyncAjaxRequestsPluginScript);
617-
userContentController.addPluginScript(InterceptAjaxRequestJS.INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT(customSettings.pluginScriptsOriginAllowList,
618-
customSettings.pluginScriptsForMainFrameOnly));
617+
userContentController.addPluginScript(InterceptAjaxRequestJS.INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT(
618+
customSettings.pluginScriptsOriginAllowList,
619+
customSettings.pluginScriptsForMainFrameOnly,
620+
customSettings.useOnAjaxReadyStateChange,
621+
customSettings.useOnAjaxProgress));
619622
}
620623
if (customSettings.useShouldInterceptFetchRequest) {
621624
userContentController.addPluginScript(InterceptFetchRequestJS.INTERCEPT_FETCH_REQUEST_JS_PLUGIN_SCRIPT(customSettings.pluginScriptsOriginAllowList,
@@ -835,11 +838,22 @@ public void setSettings(InAppWebViewSettings newCustomSettings, HashMap<String,
835838
enablePluginScriptAtRuntime(
836839
InterceptAjaxRequestJS.FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE(),
837840
newCustomSettings.useShouldInterceptAjaxRequest,
838-
InterceptAjaxRequestJS.INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT(customSettings.pluginScriptsOriginAllowList,
839-
customSettings.pluginScriptsForMainFrameOnly)
841+
InterceptAjaxRequestJS.INTERCEPT_AJAX_REQUEST_JS_PLUGIN_SCRIPT(
842+
customSettings.pluginScriptsOriginAllowList,
843+
customSettings.pluginScriptsForMainFrameOnly,
844+
newCustomSettings.useOnAjaxReadyStateChange,
845+
newCustomSettings.useOnAjaxProgress)
840846
);
841847
}
842848

849+
if (newSettingsMap.get("useOnAjaxReadyStateChange") != null && customSettings.useOnAjaxReadyStateChange != newCustomSettings.useOnAjaxReadyStateChange) {
850+
evaluateJavascript("((window.top == null || window.top === window) ? window : window.top)." + InterceptAjaxRequestJS.FLAG_VARIABLE_FOR_ON_AJAX_READY_STATE_CHANGE() + " = " + newCustomSettings.useOnAjaxReadyStateChange + ";", null);
851+
}
852+
853+
if (newSettingsMap.get("useOnAjaxProgress") != null && customSettings.useOnAjaxProgress != newCustomSettings.useOnAjaxProgress) {
854+
evaluateJavascript("((window.top == null || window.top === window) ? window : window.top)." + InterceptAjaxRequestJS.FLAG_VARIABLE_FOR_ON_AJAX_PROGRESS() + " = " + newCustomSettings.useOnAjaxProgress + ";", null);
855+
}
856+
843857
if (newSettingsMap.get("interceptOnlyAsyncAjaxRequests") != null && customSettings.interceptOnlyAsyncAjaxRequests != newCustomSettings.interceptOnlyAsyncAjaxRequests) {
844858
enablePluginScriptAtRuntime(
845859
InterceptAjaxRequestJS.FLAG_VARIABLE_FOR_INTERCEPT_ONLY_ASYNC_AJAX_REQUESTS_JS_SOURCE(),
@@ -1191,12 +1205,12 @@ public Map<String, Object> getCustomSettingsMap() {
11911205
public void enablePluginScriptAtRuntime(final String flagVariable,
11921206
final boolean enable,
11931207
final PluginScript pluginScript) {
1194-
evaluateJavascript("window." + flagVariable, null, new ValueCallback<String>() {
1208+
evaluateJavascript("((window.top == null || window.top === window) ? window : window.top)." + flagVariable, null, new ValueCallback<String>() {
11951209
@Override
11961210
public void onReceiveValue(String value) {
11971211
boolean alreadyLoaded = value != null && !value.equalsIgnoreCase("null");
11981212
if (alreadyLoaded) {
1199-
String enableSource = "window." + flagVariable + " = " + enable + ";";
1213+
String enableSource = "((window.top == null || window.top === window) ? window : window.top)." + flagVariable + " = " + enable + ";";
12001214
evaluateJavascript(enableSource, null, null);
12011215
if (!enable) {
12021216
userContentController.removePluginScript(pluginScript);

flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/webview/in_app_webview/InAppWebViewSettings.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public class InAppWebViewSettings implements ISettings<InAppWebViewInterface> {
4949
public List<Map<String, Map<String, Object>>> contentBlockers = new ArrayList<>();
5050
public Integer preferredContentMode = PreferredContentModeOptionType.RECOMMENDED.toValue();
5151
public Boolean useShouldInterceptAjaxRequest = false;
52+
public Boolean useOnAjaxReadyStateChange = false;
53+
public Boolean useOnAjaxProgress = false;
5254
public Boolean interceptOnlyAsyncAjaxRequests = true;
5355
public Boolean useShouldInterceptFetchRequest = false;
5456
public Boolean incognito = false;
@@ -219,6 +221,12 @@ public InAppWebViewSettings parse(@NonNull Map<String, Object> settings) {
219221
case "useShouldInterceptAjaxRequest":
220222
useShouldInterceptAjaxRequest = (Boolean) value;
221223
break;
224+
case "useOnAjaxReadyStateChange":
225+
useOnAjaxReadyStateChange = (Boolean) value;
226+
break;
227+
case "useOnAjaxProgress":
228+
useOnAjaxProgress = (Boolean) value;
229+
break;
222230
case "interceptOnlyAsyncAjaxRequests":
223231
interceptOnlyAsyncAjaxRequests = (Boolean) value;
224232
break;
@@ -497,6 +505,8 @@ public Map<String, Object> toMap() {
497505
settings.put("contentBlockers", contentBlockers);
498506
settings.put("preferredContentMode", preferredContentMode);
499507
settings.put("useShouldInterceptAjaxRequest", useShouldInterceptAjaxRequest);
508+
settings.put("useOnAjaxReadyStateChange", useOnAjaxReadyStateChange);
509+
settings.put("useOnAjaxProgress", useOnAjaxProgress);
500510
settings.put("interceptOnlyAsyncAjaxRequests", interceptOnlyAsyncAjaxRequests);
501511
settings.put("useShouldInterceptFetchRequest", useShouldInterceptFetchRequest);
502512
settings.put("incognito", incognito);

flutter_inappwebview_android/lib/src/in_app_webview/headless_in_app_webview.dart

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,19 @@ class AndroidHeadlessInAppWebView extends PlatformHeadlessInAppWebView
368368
settings.useOnDownloadStart == null) {
369369
settings.useOnDownloadStart = true;
370370
}
371-
if (params.shouldInterceptAjaxRequest != null &&
372-
settings.useShouldInterceptAjaxRequest == null) {
373-
settings.useShouldInterceptAjaxRequest = true;
371+
if ((params.shouldInterceptAjaxRequest != null ||
372+
params.onAjaxProgress != null ||
373+
params.onAjaxReadyStateChange != null)) {
374+
if (settings.useShouldInterceptAjaxRequest == null) {
375+
settings.useShouldInterceptAjaxRequest = true;
376+
}
377+
if (params.onAjaxReadyStateChange != null &&
378+
settings.useOnAjaxReadyStateChange == null) {
379+
settings.useOnAjaxReadyStateChange = true;
380+
}
381+
if (params.onAjaxProgress != null && settings.useOnAjaxProgress == null) {
382+
settings.useOnAjaxProgress = true;
383+
}
374384
}
375385
if (params.shouldInterceptFetchRequest != null &&
376386
settings.useShouldInterceptFetchRequest == null) {

flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview.dart

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,18 @@ class AndroidInAppWebViewWidget extends PlatformInAppWebViewWidget {
431431
settings.useOnDownloadStart = true;
432432
}
433433
if ((params.shouldInterceptAjaxRequest != null ||
434-
params.onAjaxProgress != null ||
435-
params.onAjaxReadyStateChange != null) &&
436-
settings.useShouldInterceptAjaxRequest == null) {
437-
settings.useShouldInterceptAjaxRequest = true;
434+
params.onAjaxProgress != null ||
435+
params.onAjaxReadyStateChange != null)) {
436+
if (settings.useShouldInterceptAjaxRequest == null) {
437+
settings.useShouldInterceptAjaxRequest = true;
438+
}
439+
if (params.onAjaxReadyStateChange != null &&
440+
settings.useOnAjaxReadyStateChange == null) {
441+
settings.useOnAjaxReadyStateChange = true;
442+
}
443+
if (params.onAjaxProgress != null && settings.useOnAjaxProgress == null) {
444+
settings.useOnAjaxProgress = true;
445+
}
438446
}
439447
if (params.shouldInterceptFetchRequest != null &&
440448
settings.useShouldInterceptFetchRequest == null) {

flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview_controller.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,13 +1455,13 @@ class AndroidInAppWebViewController extends PlatformInAppWebViewController
14551455

14561456
if (webviewParams != null &&
14571457
webviewParams!.onAjaxReadyStateChange != null)
1458-
return (await webviewParams!.onAjaxReadyStateChange!(
1458+
return jsonEncode((await webviewParams!.onAjaxReadyStateChange!(
14591459
_controllerFromPlatform, request))
1460-
?.toNativeValue();
1460+
?.toNativeValue());
14611461
else
1462-
return (await _inAppBrowserEventHandler!
1462+
return jsonEncode((await _inAppBrowserEventHandler!
14631463
.onAjaxReadyStateChange(request))
1464-
?.toNativeValue();
1464+
?.toNativeValue());
14651465
}
14661466
return null;
14671467
case "onAjaxProgress":
@@ -1474,13 +1474,13 @@ class AndroidInAppWebViewController extends PlatformInAppWebViewController
14741474

14751475
if (webviewParams != null &&
14761476
webviewParams!.onAjaxProgress != null)
1477-
return (await webviewParams!.onAjaxProgress!(
1477+
return jsonEncode((await webviewParams!.onAjaxProgress!(
14781478
_controllerFromPlatform, request))
1479-
?.toNativeValue();
1479+
?.toNativeValue());
14801480
else
1481-
return (await _inAppBrowserEventHandler!
1481+
return jsonEncode((await _inAppBrowserEventHandler!
14821482
.onAjaxProgress(request))
1483-
?.toNativeValue();
1483+
?.toNativeValue());
14841484
}
14851485
return null;
14861486
case "shouldInterceptFetchRequest":

0 commit comments

Comments
 (0)