From 032531ae77cb00bd77b547ed2708c4eff123deb4 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 6 Nov 2014 17:02:58 -0500 Subject: [PATCH] CB-7977 Mention deviceready in plugin docs --- doc/index.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/index.md b/doc/index.md index 48c8e5a..0aee1e6 100644 --- a/doc/index.md +++ b/doc/index.md @@ -19,9 +19,16 @@ # org.apache.cordova.camera -This plugin provides an API for taking pictures and for choosing images from +This plugin defines a global `navigator.camera` object, which provides an API for taking pictures and for choosing images from the system's image library. +Although the object is attached to the global scoped `navigator`, it is not available until after the `deviceready` event. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(navigator.camera); + } + ## Installation cordova plugin add org.apache.cordova.camera