-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[webview_flutter] Adds option to register JavaScript console callback #4541
[webview_flutter] Adds option to register JavaScript console callback #4541
Conversation
18b1053
to
cd2a81c
Compare
...s/webview_flutter/webview_flutter_platform_interface/lib/src/types/javascript_log_level.dart
Show resolved
Hide resolved
c0ac04e
to
c1091ac
Compare
@mvanbeusekom Has this PR approved |
The option seems to be missing, most likely since I am pushing from the Baseflow organizational account. I will try another way to provide you with write access. |
6a3a91b
to
bdb30a7
Compare
@bparrishMines, I have completed the Apple, Android and App facing implementations. Could you do an initial review before we split this PR up in separate PRs per package? |
…kit_webview_controller.dart Co-authored-by: Maurice Parrish <[email protected]>
…low/flutter_packages into feature/forward_javascript_console
@bparrishMines, @stuartmorgan, During additional testing I think I discovered a bug in Androids mapping of the JavaScript The mapping I expected was as follows:
Question is, how should I treat this in the plugin? I can remap |
I think it's fine to have our enum have the 5 JS options, and just comment that platforms may not preserve all the level information so clients should not rely on a 1:1 mapping between the JS calls. Then map |
…low/flutter_packages into feature/forward_javascript_console
…re/forward_javascript_console
…low/flutter_packages into feature/forward_javascript_console
…log (#4701) Adds an option to the `webview_flutter_platform_interface` to register a JavaScript console callback. This will allow developers to receive JavaScript console messages in a Dart callback. This PR contains the `webview_flutter_platform_interface` changes from PR #4541. Related issue: flutter/flutter#32908 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
Update from triage: interface landed, implementation PRs are just waiting for review. |
… console log (#4703) Adds the WKWebView implementation for registering a JavaScript console callback. This will allow developers to receive JavaScript console messages in a Dart callback. This PR contains the `webview_flutter_wkwebview` specific changes from PR #4541. Related issue: flutter/flutter#32908 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
Closing this PR in favor of PRs separated per platform. |
…sole log (#4702) Adds the Android implementation for registering a JavaScript console callback. This will allow developers to receive JavaScript console messages in a Dart callback. This PR contains the `webview_flutter_android` specific changes from PR #4541. Related issue: flutter/flutter#32908 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
…log (#4705) Adds the app facing implementation for registering a JavaScript console callback. This will allow developers to receive JavaScript console messages in a Dart callback. This PR contains the `webview_flutter` specific changes from PR #4541. Fixes flutter/flutter#32908 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
… console log (flutter#4703) Adds the WKWebView implementation for registering a JavaScript console callback. This will allow developers to receive JavaScript console messages in a Dart callback. This PR contains the `webview_flutter_wkwebview` specific changes from PR flutter#4541. Related issue: flutter/flutter#32908 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
…sole log (flutter#4702) Adds the Android implementation for registering a JavaScript console callback. This will allow developers to receive JavaScript console messages in a Dart callback. This PR contains the `webview_flutter_android` specific changes from PR flutter#4541. Related issue: flutter/flutter#32908 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
…log (flutter#4705) Adds the app facing implementation for registering a JavaScript console callback. This will allow developers to receive JavaScript console messages in a Dart callback. This PR contains the `webview_flutter` specific changes from PR flutter#4541. Fixes flutter/flutter#32908 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
Adds an options to register a JavaScript console callback, which will allow developers to receive JavaScript console messages in a Dart callback.
Resolves flutter/flutter#32908
@bparrishMines, could you please add the necessary code to bridge the Android
WebChromeClient.onConsoleMessage
callback to Dart (Android API documentation: https://developer.android.com/reference/android/webkit/WebChromeClient#onConsoleMessage(android.webkit.ConsoleMessage))?If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.