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): Use addWebMessageListener where available #5427

Merged
merged 11 commits into from
Jul 20, 2022

Conversation

jcesarmobile
Copy link
Member

@jcesarmobile jcesarmobile commented Feb 10, 2022

This PR will use the addWebMessageListener API if available, if not it will default to the old bridge.

I made that the bridge is injected to the capacitor default url (i.e. http://localhost), to server.url if configured, and also to all the urls in server.allowNavigation.
Also only passes the message to the js side if it's the main frame.

@jcesarmobile jcesarmobile marked this pull request as ready for review July 18, 2022 17:39
@jcesarmobile jcesarmobile changed the title WIP: Use addWebMessageListener where available feat(android): Use addWebMessageListener where available Jul 18, 2022
@jcesarmobile
Copy link
Member Author

did a minor change to use a lambda that simplifies the code

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.

None yet

4 participants