func (_this *BatteryManager) Charging() bool {
	var ret bool
	value := _this.Value_JS.Get("charging")
	ret = (value).Bool()
	return ret
}
Charging returning attribute 'charging' with
type bool (idl: boolean).
package battery
import js "github.com/gowebapi/webapi/core/js"
import (
	"github.com/gowebapi/webapi/dom/domcore"
	"github.com/gowebapi/webapi/javascript"
)
func unused(value interface{}) {
}
type Union struct {
	Value js.Value
}
func (u *Union) JSValue() js.Value {
	return u.Value
}
func UnionFromJS(value js.Value) *Union {
	return &Union{Value: value}
}
type PromiseBatteryManagerOnFulfilledFunc func(value *BatteryManager)
type PromiseBatteryManagerOnFulfilled js.Func
func PromiseBatteryManagerOnFulfilledToJS(callback PromiseBatteryManagerOnFulfilledFunc) *PromiseBatteryManagerOnFulfilled {
	if callback == nil {
		return nil
	}
	ret := PromiseBatteryManagerOnFulfilled(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 *BatteryManager  
		)
		_p0 = BatteryManagerFromJS(args[0])
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseBatteryManagerOnFulfilledFromJS(_value js.Value) PromiseBatteryManagerOnFulfilledFunc {
	return func(value *BatteryManager) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := value.JSValue()
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseBatteryManagerOnRejectedFunc func(reason js.Value)
type PromiseBatteryManagerOnRejected js.Func
func PromiseBatteryManagerOnRejectedToJS(callback PromiseBatteryManagerOnRejectedFunc) *PromiseBatteryManagerOnRejected {
	if callback == nil {
		return nil
	}
	ret := PromiseBatteryManagerOnRejected(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 js.Value  
		)
		_p0 = args[0]
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseBatteryManagerOnRejectedFromJS(_value js.Value) PromiseBatteryManagerOnRejectedFunc {
	return func(reason js.Value) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := reason
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type BatteryManager struct {
	domcore.EventTarget
}
func BatteryManagerFromJS(value js.Wrapper) *BatteryManager {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &BatteryManager{}
	ret.Value_JS = input
	return ret
}