CB-7977 Mention deviceready in plugin docs

This commit is contained in:
Josh Soref 2014-11-06 17:11:47 -05:00
parent 2818011249
commit 70d74e5273

View File

@ -32,6 +32,15 @@ whitelist, nor is opening links in the system browser.
The InAppBrowser provides by default its own GUI controls for the user (back, The InAppBrowser provides by default its own GUI controls for the user (back,
forward, done). forward, done).
This plugin hooks `window.open`.
Although `window.open` is in the global scope, InAppBrowser is not available until after the `deviceready` event.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log("window.open works well");
}
## Installation ## Installation
cordova plugin add org.apache.cordova.inappbrowser cordova plugin add org.apache.cordova.inappbrowser