cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject [2/2] cordova-plugin-vibration git commit: CB-7977 Mention deviceready in plugin docs
Date Wed, 12 Nov 2014 17:47:37 GMT
CB-7977 Mention deviceready in plugin docs


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

Branch: refs/heads/master
Commit: a520f0de030a217868dcf409bf9612defe20170f
Parents: 1282468
Author: Josh Soref <jsoref@blackberry.com>
Authored: Thu Nov 6 17:21:27 2014 -0500
Committer: Josh Soref <jsoref@blackberry.com>
Committed: Thu Nov 6 17:21:27 2014 -0500

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/a520f0de/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index 2ef61d5..af360b9 100755
--- a/doc/index.md
+++ b/doc/index.md
@@ -23,6 +23,15 @@ This plugin aligns with the W3C vibration specification http://www.w3.org/TR/vib
 
 This plugin provides a way to vibrate the device.
 
+This plugin defines global objects including `navigator.vibrate`.
+
+Although in the global scope, they are not available until after the `deviceready` event.
+
+    document.addEventListener("deviceready", onDeviceReady, false);
+    function onDeviceReady() {
+        console.log(navigator.vibrate);
+    }
+
 ## Installation
 
     cordova plugin add org.apache.cordova.vibration


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


Mime
View raw message