-
Notifications
You must be signed in to change notification settings - Fork 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
feat(android): ability to add listeners to the Capacitor WebView #4405
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation only allows to add listeners from the bridge builder. I think it should allow to add (and maybe remove) listeners after the bridge has been created too, so, in example, a plugin or some custom user code in the activity class can add new listeners
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Adds the ability to register a callback to execute when certain events occur in the WebView in Capacitor. This PR includes a method to add an event when the page is finished loading. In the future this can also be used to add page error event callbacks, for instance.
Usage example: masking the view and fading it out when the web app is loaded, to hide ugly gaps in app loading