From b448166624a29cac607c38b45f454581757eb411 Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Mon, 16 May 2016 18:01:34 -0700 Subject: [PATCH] patched missing _ready method, and changed the way the proxy is installed --- plugin.xml | 4 ++-- src/browser/{statusbar.js => StatusBarProxy.js} | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) rename src/browser/{statusbar.js => StatusBarProxy.js} (73%) diff --git a/plugin.xml b/plugin.xml index 9a19905..3e9b826 100644 --- a/plugin.xml +++ b/plugin.xml @@ -48,8 +48,8 @@ - - + + diff --git a/src/browser/statusbar.js b/src/browser/StatusBarProxy.js similarity index 73% rename from src/browser/statusbar.js rename to src/browser/StatusBarProxy.js index 3e9d05e..3e90c6c 100644 --- a/src/browser/statusbar.js +++ b/src/browser/StatusBarProxy.js @@ -18,9 +18,15 @@ * */ -function notSupported() { +function notSupported(win,fail) { + // console.log('StatusBar is not supported'); - return false; + setTimeout(function(){ + win(); + // note that while it is not explicitly supported, it does not fail + // this is really just here to allow developers to test their code in the browser + // and if we fail, then their app might as well. -jm + },0); } module.exports = { @@ -34,6 +40,9 @@ module.exports = { backgroundColorByName: notSupported, backgroundColorByHexString: notSupported, hide: notSupported, - show: notSupported + show: notSupported, + _ready:notSupported }; +require("cordova/exec/proxy").add("StatusBar", module.exports); +