Skip to content

Commit

Permalink
updated shouldOverrideUrlLoading event for #146, added print method a…
Browse files Browse the repository at this point in the history
…nd event #128, fix #123 javascript handler for Android API <= 22, renamed onTargetBlank to onCreateWindow event, deleted useOnTargetBlank option, added supportMultipleWindows android option, added getDefaultUserAgent static method, Updated default value for domStorageEnabled option to true
  • Loading branch information
pichillilorenzo committed Dec 9, 2019
1 parent 5858f2f commit 9d5e1f5
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 41 deletions.
96 changes: 59 additions & 37 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,10 @@ class MyInAppBrowser extends InAppBrowser {
}
@override
void shouldOverrideUrlLoading(ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest) {
Future<ShouldOverrideUrlLoadingAction> shouldOverrideUrlLoading(ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest) async {
print("\n\n override ${shouldOverrideUrlLoadingRequest.url}\n\n");
this.webViewController.loadUrl(url: shouldOverrideUrlLoadingRequest.url);
return ShouldOverrideUrlLoadingAction.CANCEL;
}
@override
Expand Down
7 changes: 4 additions & 3 deletions example/lib/in_app_browser_example.screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ class MyInAppBrowser extends InAppBrowser {
}

@override
void shouldOverrideUrlLoading(String url, Map<String, String> headers, bool isForMainFrame) {
print("\n\n override $url\n\n");
this.webViewController.loadUrl(url: url);
Future<ShouldOverrideUrlLoadingAction> shouldOverrideUrlLoading(ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest) async {
print("\n\n override ${shouldOverrideUrlLoadingRequest.url}\n\n");
this.webViewController.loadUrl(url: shouldOverrideUrlLoadingRequest.url);
return ShouldOverrideUrlLoadingAction.CANCEL;
}

@override
Expand Down

0 comments on commit 9d5e1f5

Please sign in to comment.