-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(inappbrowser): implement instance based wrapper #305
Conversation
}) | ||
static open(url: string, target?: string, options?: string): InAppBrowserRef { return; } | ||
|
||
on(event: string): Observable<InAppBrowserEvent> { |
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.
What's the purpose of this function? Is this generic and something we could abstract for other plugins?
Looks like a nice improvement. Added a few comments on a few lines. Basically, it needs a simple usage comment and then I was confused by |
The |
This wrapper makes the inappbrowser instance based instead of being static.
The
.open()
method that we currently have returnsInAppBrowserRef
which had some functions that take callbacks as parameters. And since one of the major goals of ionic-native is to convert all callbacks to promises and observables, this wrapper seem to make more sense.I also added a fallback that will use
window.open()
in a scenario wherecordova
orcordova.InAppBrowser
is not available.Closes #247