mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-19 09:22:50 +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>
|
||||||
|
|
||||||
<platform name="browser">
|
<platform name="browser">
|
||||||
<js-module src="src/browser/statusbar.js" name="statusbar.Browser">
|
<js-module src="src/browser/StatusBarProxy.js" name="StatusBarProxy">
|
||||||
<merges target="window.StatusBar" />
|
<runs />
|
||||||
</js-module>
|
</js-module>
|
||||||
</platform>
|
</platform>
|
||||||
|
|
||||||
|
@ -18,9 +18,15 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function notSupported() {
|
function notSupported(win,fail) {
|
||||||
|
//
|
||||||
console.log('StatusBar is not supported');
|
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 = {
|
module.exports = {
|
||||||
@ -34,6 +40,9 @@ module.exports = {
|
|||||||
backgroundColorByName: notSupported,
|
backgroundColorByName: notSupported,
|
||||||
backgroundColorByHexString: notSupported,
|
backgroundColorByHexString: notSupported,
|
||||||
hide: 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