You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/05/10 15:33:02 UTC

[GitHub] [cordova-plugin-statusbar] CodeWithOz opened a new issue #212: Add success and error callbacks for the `overlaysWebView` method

CodeWithOz opened a new issue #212:
URL: https://github.com/apache/cordova-plugin-statusbar/issues/212


   # Feature Request
   
   ## Motivation Behind Feature
   <!-- Why should this feature be implemented? What problem does it solve? -->
   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
   <!-- 
   Describe your feature request in detail
   Please provide any code examples or screenshots of what this feature would look like
   Are there any drawbacks? Will this break anything for existing users? 
   -->
   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
   <!-- 
   Describe alternatives or workarounds you are currently using 
   Are there ways to do this with existing functionality?
   -->
   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](https://github.com/CodeWithOz/cordova-plugin-statusbar/commits/master). I can create a PR for this too if needed, though my fork doesn't include the required iOS changes.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org