From 70d74e5273ed4e34bd797c574a748c0e1691bd12 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 6 Nov 2014 17:11:47 -0500 Subject: [PATCH] CB-7977 Mention deviceready in plugin docs --- doc/index.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/index.md b/doc/index.md index d6dda3b..a6fb07a 100644 --- a/doc/index.md +++ b/doc/index.md @@ -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, 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 cordova plugin add org.apache.cordova.inappbrowser