cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject cordova-plugin-geolocation git commit: CB-7977 Mention deviceready in plugin docs
Date Wed, 12 Nov 2014 17:45:14 GMT
Repository: cordova-plugin-geolocation
Updated Branches:
  refs/heads/master 887df5268 -> 7dc440053


CB-7977 Mention deviceready in plugin docs


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/7dc44005
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/7dc44005
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/7dc44005

Branch: refs/heads/master
Commit: 7dc440053469300efc6c8f31904f1e09358318f2
Parents: 887df52
Author: Josh Soref <jsoref@blackberry.com>
Authored: Thu Nov 6 17:11:11 2014 -0500
Committer: Josh Soref <jsoref@blackberry.com>
Committed: Thu Nov 6 17:11:11 2014 -0500

----------------------------------------------------------------------
 doc/index.md | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/7dc44005/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index 8b53a2f..71bfb6a 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -45,6 +45,17 @@ above, as well as obtaining the user's permission (e.g., by presenting
 choices for __OK__ and __No Thanks__).  For more information, please
 see the Privacy Guide.
 
+This plugin defines a global `navigator.geolocation` object (for platforms
+where it is otherwise missing).
+
+Although the object is in the global scope, features provided by this plugin
+are not available until after the `deviceready` event.
+
+    document.addEventListener("deviceready", onDeviceReady, false);
+    function onDeviceReady() {
+        console.log("navigator.geolocation works well");
+    }
+
 ## Installation
 
     cordova plugin add org.apache.cordova.geolocation


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message