cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [3/3] docs commit: navigator.network.connection -> navigator.connection.
Date Thu, 18 Oct 2012 15:13:46 GMT
navigator.network.connection -> navigator.connection.


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

Branch: refs/heads/master
Commit: d443d58a42d1b9feed60d2afd4e58b19337b4cf4
Parents: 032bbb2
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Oct 18 10:52:31 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Oct 18 10:52:31 2012 -0400

----------------------------------------------------------------------
 docs/en/edge/cordova/connection/connection.md      |    2 +-
 docs/en/edge/cordova/connection/connection.type.md |   22 ++++++++++-----
 2 files changed, 16 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/d443d58a/docs/en/edge/cordova/connection/connection.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/connection/connection.md b/docs/en/edge/cordova/connection/connection.md
index f69dc7a..cf54580 100644
--- a/docs/en/edge/cordova/connection/connection.md
+++ b/docs/en/edge/cordova/connection/connection.md
@@ -22,7 +22,7 @@ Connection
 
 > The `connection` object gives access to the device's cellular and wifi connection information.
 
-This object is accessed under the `navigator.network` interface.
+This object is exposed as `navigator.connection`.
 
 Properties
 ----------

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/d443d58a/docs/en/edge/cordova/connection/connection.type.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/connection/connection.type.md b/docs/en/edge/cordova/connection/connection.type.md
index dc956d1..c3deb79 100644
--- a/docs/en/edge/cordova/connection/connection.type.md
+++ b/docs/en/edge/cordova/connection/connection.type.md
@@ -42,7 +42,7 @@ Quick Example
 -------------
 
     function checkConnection() {
-        var networkState = navigator.network.connection.type;
+        var networkState = navigator.connection.type;
         
         var states = {};
         states[Connection.UNKNOWN]	= 'Unknown connection';
@@ -64,7 +64,7 @@ Full Example
     <!DOCTYPE html>
     <html>
       <head>
-        <title>navigator.network.connection.type Example</title>
+        <title>navigator.connection.type Example</title>
         
         <script type="text/javascript" charset="utf-8" src="cordova-2.2.0.js"></script>
         <script type="text/javascript" charset="utf-8">
@@ -80,7 +80,7 @@ Full Example
         }
         
 	    function checkConnection() {
-	        var networkState = navigator.network.connection.type;
+	        var networkState = navigator.connection.type;
 
 	        var states = {};
 	        states[Connection.UNKNOWN]	= 'Unknown connection';
@@ -101,17 +101,25 @@ Full Example
       </body>
     </html>
 
+API Change
+----------
+Before Cordova 2.2.0, the Connection object existed at: `navigator.network.connection`.
+
+To match the spec, this was changed to `navigator.connection` in 2.2.0.
+
+`navigator.network.connection` still exists, but is now deprecated and will be removed in
a future release.
+
 iOS Quirks
 ----------
 
 - iOS cannot detect the type of cellular network connection.
-    - `navigator.network.connection.type` is set to `Connection.CELL_2G` for all cellular
data.
+    - `navigator.connection.type` is set to `Connection.CELL_2G` for all cellular data.
 
 Bada Quirks
 -----------
 
 - Bada can only detect a WiFi or cellular connection.
-    - `navigator.network.connection.type` is set to `Connection.CELL_2G` for all cellular
data.
+    - `navigator.connection.type` is set to `Connection.CELL_2G` for all cellular data.
 
 webOS Quirks
 ------------
@@ -121,10 +129,10 @@ webOS Quirks
 Windows Phone Quirks
 --------------------
 
-- Windows Phone Emulator always detects `navigator.network.connection.type` as `Connection.UNKNOWN`.
+- Windows Phone Emulator always detects `navigator.connection.type` as `Connection.UNKNOWN`.
 
 Tizen Quirks
 --------------------
 
 - Tizen can only detect a WiFi or cellular connection.
-    - `navigator.network.connection.type` is set to `Connection.CELL_2G` for all cellular
data.
+    - `navigator.connection.type` is set to `Connection.CELL_2G` for all cellular data.


Mime
View raw message