Skip to content

Add success and error callbacks for the overlaysWebView method #212

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

Open
CodeWithOz opened this issue May 10, 2021 · 0 comments
Open

Add success and error callbacks for the overlaysWebView method #212

CodeWithOz opened this issue May 10, 2021 · 0 comments

Comments

@CodeWithOz
Copy link

Feature Request

Motivation Behind Feature

I need a way to know when the overlaysWebView method has completed its work, so that I can ensure that my custom javascript logic is always run after the native code has been executed. Right now I can do this:

StatusBar.overlaysWebView(false)
myCustomLogic();

But myCustomLogic may actually get executed before the statusbar stops overlaying the webview.

Feature Description

I think a good solution is to use the callback system that we're already familiar with. The code snippet above could therefore become:

StatusBar.overlaysWebView(false, myCustomSuccessLogic, myCustomErrorLogic);

I don't expect this to break anything for existing users, I believe this change will be an extension of the current functionality and may prove useful for other developers.

Alternatives or Workarounds

I forked the plugin and made the changes needed for Android so that I could test that it works well for me. You can check the 3 most recent commits on my fork. I can create a PR for this too if needed, though my fork doesn't include the required iOS changes.

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

No branches or pull requests

1 participant