mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-02-22 22:12:54 +08:00
CB-7977 Mention deviceready in plugin docs
This commit is contained in:
parent
fb4cff9cc0
commit
032531ae77
@ -19,9 +19,16 @@
|
|||||||
|
|
||||||
# org.apache.cordova.camera
|
# 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.
|
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
|
## Installation
|
||||||
|
|
||||||
cordova plugin add org.apache.cordova.camera
|
cordova plugin add org.apache.cordova.camera
|
||||||
|
Loading…
Reference in New Issue
Block a user