You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2013/07/09 19:21:29 UTC

docs commit: CB-3420 added hidden option and show method Also minor doc cleanup

Updated Branches:
  refs/heads/master c31204047 -> d9c639f07


CB-3420 added hidden option and show method
Also minor doc cleanup


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/d9c639f0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/d9c639f0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/d9c639f0

Branch: refs/heads/master
Commit: d9c639f076bf126acbf8f3e537c8211a39ebdc7d
Parents: c312040
Author: David Kemp <dr...@chromium.org>
Authored: Tue Jul 2 11:55:00 2013 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Tue Jul 9 13:20:37 2013 -0400

----------------------------------------------------------------------
 .../edge/cordova/inappbrowser/inappbrowser.md   | 57 ++++++++++++++++++++
 .../en/edge/cordova/inappbrowser/window.open.md |  6 ++-
 2 files changed, 61 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d9c639f0/docs/en/edge/cordova/inappbrowser/inappbrowser.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/inappbrowser/inappbrowser.md b/docs/en/edge/cordova/inappbrowser/inappbrowser.md
index 9300d81..9df6461 100644
--- a/docs/en/edge/cordova/inappbrowser/inappbrowser.md
+++ b/docs/en/edge/cordova/inappbrowser/inappbrowser.md
@@ -35,6 +35,7 @@ Methods
 - addEventListener
 - removeEventListener
 - close
+- show
 - executeScript
 - insertCSS
 
@@ -261,6 +262,62 @@ Full Example
       </body>
     </html>
 
+show
+=====
+
+> Displays an InAppBrowser window that was opened hidden. Calling this has no effect if the InAppBrowser was already visible.
+
+    ref.show();
+
+- __ref:__ reference to the InAppBrowser window (`InAppBrowser`)
+
+Supported Platforms
+-------------------
+
+- Android
+- iOS
+
+Quick Example
+-------------
+
+    var ref = window.open('http://apache.org', '_blank', 'hidden=yes');
+    ref.show();
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>InAppBrowser.show Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+             var ref = window.open('http://apache.org', '_blank', 'hidden=yes');
+             ref.addEventListener('loadstop', function(event) {
+                 alert('background window loaded'); 
+             });
+             // close InAppBrowser after 5 seconds
+             setTimeout(function() {
+                 ref.close();
+             }, 5000);
+        }
+
+        </script>
+      </head>
+      <body>
+      </body>
+    </html>
+
+
 executeScript
 =============
 

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d9c639f0/docs/en/edge/cordova/inappbrowser/window.open.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/inappbrowser/window.open.md b/docs/en/edge/cordova/inappbrowser/window.open.md
index f64eee5..24bd58d 100644
--- a/docs/en/edge/cordova/inappbrowser/window.open.md
+++ b/docs/en/edge/cordova/inappbrowser/window.open.md
@@ -40,12 +40,14 @@ instance, or the system browser.
     - __location__: Set to `yes` or `no` to turn the `InAppBrowser`'s location bar on or off.
     
     Android only
-    ------------
-    - __closebuttoncaption__ - set to a string that will be the caption for the "Done" button.
+    --------------------
+    - __closebuttoncaption__ - set to a string that will be the caption for the "Done" button. 
+    - __hidden__ - set to 'yes' to create the browser and load the page, but not show it. The load event will fire when loading is complete. Omit or set to 'no' (default) to have the browser open and load normally. 
 
     iOS only
     --------
     - __closebuttoncaption__ - set to a string that will be the caption for the "Done" button. Note that you will have to localize this value yourself.
+    - __hidden__ - set to 'yes' to create the browser and load the page, but not show it. The load event will fire when loading is complete. Omit or set to 'no' (default) to have the browser open and load normally. 
     - __toolbar__ -  set to 'yes' or 'no' to turn the toolbar on or off for the InAppBrowser (defaults to 'yes')
     - __enableViewportScale__:  Set to `yes` or `no` to prevent viewport scaling through a meta tag (defaults to `no`).
     - __mediaPlaybackRequiresUserAction__: Set to `yes` or `no` to prevent HTML5 audio or video from autoplaying (defaults to `no`).