mirror of
https://github.com/xuxiaobo-bobo/boda_jsEnv.git
synced 2025-04-19 19:39:51 +08:00
17 lines
3.2 KiB
JavaScript
17 lines
3.2 KiB
JavaScript
// BatteryManager对象
|
|
|
|
BatteryManager = function BatteryManager(){let arg=arguments[0];
|
|
|
|
if (arg!='bobo' && !(this instanceof BatteryManager) ){return bodavm.toolsFunc.throwError("TypeError", "Illegal constructor")};bodavm.toolsFunc.symbolProperty(this);
|
|
|
|
if (arg =='bobo'){console.log_copy('BatteryManager 实例化对象 --->',JSON.stringify_bo(arguments,function(k,v){if (v==window){return 'window'}else{return v}}))};}
|
|
|
|
|
|
bodavm.toolsFunc.safeProto(BatteryManager, "BatteryManager");
|
|
|
|
BatteryManager.prototype.__proto__=EventTarget.prototype;
|
|
|
|
BatteryManager.__proto__=EventTarget;
|
|
|
|
bodavm.toolsFunc.defineProperty(BatteryManager.prototype, "charging", {configurable:true, enumerable:true, get:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_get", arguments)}, set:undefined},);
|
|
|
|
bodavm.toolsFunc.defineProperty(BatteryManager.prototype, "chargingTime", {configurable:true, enumerable:true, get:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_get", arguments)}, set:undefined},);
|
|
|
|
bodavm.toolsFunc.defineProperty(BatteryManager.prototype, "dischargingTime", {configurable:true, enumerable:true, get:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_get", arguments)}, set:undefined},);
|
|
|
|
bodavm.toolsFunc.defineProperty(BatteryManager.prototype, "level", {configurable:true, enumerable:true, get:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_get", arguments)}, set:undefined},);
|
|
|
|
bodavm.toolsFunc.defineProperty(BatteryManager.prototype, "onchargingchange", {configurable:true, enumerable:true, get:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_get", arguments)}, set:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_set", arguments)}},);
|
|
|
|
bodavm.toolsFunc.defineProperty(BatteryManager.prototype, "onchargingtimechange", {configurable:true, enumerable:true, get:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_get", arguments)}, set:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_set", arguments)}},);
|
|
|
|
bodavm.toolsFunc.defineProperty(BatteryManager.prototype, "ondischargingtimechange", {configurable:true, enumerable:true, get:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_get", arguments)}, set:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_set", arguments)}},);
|
|
|
|
bodavm.toolsFunc.defineProperty(BatteryManager.prototype, "onlevelchange", {configurable:true, enumerable:true, get:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_get", arguments)}, set:function bodefault (){return bodavm.toolsFunc.dispatch(this, BatteryManager.prototype, "BatteryManager", "bodefault_set", arguments)}},);
|
|
|