Skip to content

Add success and error callbacks for the overlaysWebView method #212

Open
@CodeWithOz

Description

@CodeWithOz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions