Skip to content
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

feat(android): enhance initialization scripts #1076

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

lucasfernog
Copy link
Member

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Checklist

  • This PR will resolve #___
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary
  • It can be built on all targets and pass CI/CD.

Other information

This PR enhances our initialization script implementation using addDocumentStartJavaScript when available. I wasn't aware of this when I wrote the original implementation (which is now the fallback option).

I realized it's an option after some researching finding this project: https://github.com/pichillilorenzo/flutter_inappwebview/blob/5009bf1fa404a3b5b28694d3a39d80f08f11a23b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserContentController.java#L208

I also added a fallback for remote URLs using onPageStarted.

@lucasfernog lucasfernog requested a review from a team as a code owner November 12, 2023 14:07
@wusyong wusyong merged commit 4d6f08e into dev Nov 13, 2023
10 checks passed
@wusyong wusyong deleted the feat/enhance-android-init-scripts branch November 13, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants