mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-19 01:12:49 +08:00
patched missing _ready method, and changed the way the proxy is installed
This commit is contained in:
parent
fc56eb211f
commit
b448166624
@ -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>
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user