patched missing _ready method, and changed the way the proxy is installed

This commit is contained in:
Jesse MacFadyen 2016-05-16 18:01:34 -07:00
parent fc56eb211f
commit b448166624
2 changed files with 14 additions and 5 deletions

View File

@ -48,8 +48,8 @@
</platform>
<platform name="browser">
<js-module src="src/browser/statusbar.js" name="statusbar.Browser">
<merges target="window.StatusBar" />
<js-module src="src/browser/StatusBarProxy.js" name="StatusBarProxy">
<runs />
</js-module>
</platform>

View File

@ -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);