Added support for hiding the web view container.  This maintains the browser
session without closing it.  The browser window can be repeatedly hidden and
shown.

** This has only been tested on android and ios **

amazon/android:
An additional `hide` action was added to `InAppBrowser#execute`.  It is
identical to `show`, except that it calls `dialog.hide()` instead.

blackberry10:
no changes

firefoxos:
Added a `hide` method that is identical to `show`, indicating it is not
supported.

ios:
Added a `hide` method that is identical to `show`, except that it uses
`dismissViewControllerAnimated`.  It checks the value of
`_previousStatusBarStyle`.  If it is `-1`, the method returns with no
action performed.  If it is not, it is set to `-1.`

ubuntu:
Added a `hide` method that sets `CordovaWrapper.global.inappbrowser.visible` to
`false`.

windows:
Added a `hide` method that sets `browserWrap.style.display` to `none`.

wp:
Added a `hide` method that is identical to `show`, except that it sets
`browser.Visibility` to `Visibility.Collapsed` and sets `AppBar.IsVisible` to
`false`.
This commit is contained in:
ekidder3
2015-02-05 07:20:57 -05:00
committed by Eric Kidder
parent ab696f6ebd
commit df8bcaf751
12 changed files with 133 additions and 2 deletions
+5
View File
@@ -118,6 +118,11 @@ var IAB = {
}
});
},
hide: function (win, lose) {
if (browserWrap) {
browserWrap.style.display = "none";
}
},
open: function (win, lose, args) {
// make function async so that we can add navigation events handlers before view is loaded and navigation occured
setImmediate(function () {