webapi: github.com/gowebapi/webapi/device/battery Index | Files

package battery

import "github.com/gowebapi/webapi/device/battery"

Package battery provides information about the battery status of the hosting device.

Index

Package Files

battery.go doc.go

type BatteryManager Uses

type BatteryManager struct {
    domcore.EventTarget
}

class: BatteryManager

func BatteryManagerFromJS Uses

func BatteryManagerFromJS(value js.Wrapper) *BatteryManager

BatteryManagerFromJS is casting a js.Wrapper into BatteryManager.

func (*BatteryManager) AddEventChargingChange Uses

func (_this *BatteryManager) AddEventChargingChange(listener func(event *domcore.Event, currentTarget *BatteryManager)) js.Func

AddChargingChange is adding doing AddEventListener for 'ChargingChange' on target. This method is returning allocated javascript function that need to be released.

func (*BatteryManager) AddEventChargingTimeChange Uses

func (_this *BatteryManager) AddEventChargingTimeChange(listener func(event *domcore.Event, currentTarget *BatteryManager)) js.Func

AddChargingTimeChange is adding doing AddEventListener for 'ChargingTimeChange' on target. This method is returning allocated javascript function that need to be released.

func (*BatteryManager) AddEventDischargingTimeChange Uses

func (_this *BatteryManager) AddEventDischargingTimeChange(listener func(event *domcore.Event, currentTarget *BatteryManager)) js.Func

AddDischargingTimeChange is adding doing AddEventListener for 'DischargingTimeChange' on target. This method is returning allocated javascript function that need to be released.

func (*BatteryManager) AddEventLevelChange Uses

func (_this *BatteryManager) AddEventLevelChange(listener func(event *domcore.Event, currentTarget *BatteryManager)) js.Func

AddLevelChange is adding doing AddEventListener for 'LevelChange' on target. This method is returning allocated javascript function that need to be released.

func (*BatteryManager) Charging Uses

func (_this *BatteryManager) Charging() bool

Charging returning attribute 'charging' with type bool (idl: boolean).

func (*BatteryManager) ChargingTime Uses

func (_this *BatteryManager) ChargingTime() float64

ChargingTime returning attribute 'chargingTime' with type float64 (idl: unrestricted double).

func (*BatteryManager) DischargingTime Uses

func (_this *BatteryManager) DischargingTime() float64

DischargingTime returning attribute 'dischargingTime' with type float64 (idl: unrestricted double).

func (*BatteryManager) Level Uses

func (_this *BatteryManager) Level() float64

Level returning attribute 'level' with type float64 (idl: double).

func (*BatteryManager) OnChargingChange Uses

func (_this *BatteryManager) OnChargingChange() domcore.EventHandlerFunc

OnChargingChange returning attribute 'onchargingchange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*BatteryManager) OnChargingTimeChange Uses

func (_this *BatteryManager) OnChargingTimeChange() domcore.EventHandlerFunc

OnChargingTimeChange returning attribute 'onchargingtimechange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*BatteryManager) OnDischargingTimeChange Uses

func (_this *BatteryManager) OnDischargingTimeChange() domcore.EventHandlerFunc

OnDischargingTimeChange returning attribute 'ondischargingtimechange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*BatteryManager) OnLevelChange Uses

func (_this *BatteryManager) OnLevelChange() domcore.EventHandlerFunc

OnLevelChange returning attribute 'onlevelchange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*BatteryManager) SetOnChargingChange Uses

func (_this *BatteryManager) SetOnChargingChange(listener func(event *domcore.Event, currentTarget *BatteryManager)) js.Func

SetOnChargingChange is assigning a function to 'onchargingchange'. This This method is returning allocated javascript function that need to be released.

func (*BatteryManager) SetOnChargingTimeChange Uses

func (_this *BatteryManager) SetOnChargingTimeChange(listener func(event *domcore.Event, currentTarget *BatteryManager)) js.Func

SetOnChargingTimeChange is assigning a function to 'onchargingtimechange'. This This method is returning allocated javascript function that need to be released.

func (*BatteryManager) SetOnDischargingTimeChange Uses

func (_this *BatteryManager) SetOnDischargingTimeChange(listener func(event *domcore.Event, currentTarget *BatteryManager)) js.Func

SetOnDischargingTimeChange is assigning a function to 'ondischargingtimechange'. This This method is returning allocated javascript function that need to be released.

func (*BatteryManager) SetOnLevelChange Uses

func (_this *BatteryManager) SetOnLevelChange(listener func(event *domcore.Event, currentTarget *BatteryManager)) js.Func

SetOnLevelChange is assigning a function to 'onlevelchange'. This This method is returning allocated javascript function that need to be released.

type PromiseBatteryManager Uses

type PromiseBatteryManager struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: Promise

func PromiseBatteryManagerFromJS Uses

func PromiseBatteryManagerFromJS(value js.Wrapper) *PromiseBatteryManager

PromiseBatteryManagerFromJS is casting a js.Wrapper into PromiseBatteryManager.

func (*PromiseBatteryManager) Catch Uses

func (_this *PromiseBatteryManager) Catch(onRejected *PromiseBatteryManagerOnRejected) (_result *PromiseBatteryManager)

func (*PromiseBatteryManager) Finally Uses

func (_this *PromiseBatteryManager) Finally(onFinally *javascript.PromiseFinally) (_result *PromiseBatteryManager)

func (*PromiseBatteryManager) JSValue Uses

func (_this *PromiseBatteryManager) JSValue() js.Value

func (*PromiseBatteryManager) Then Uses

func (_this *PromiseBatteryManager) Then(onFulfilled *PromiseBatteryManagerOnFulfilled, onRejected *PromiseBatteryManagerOnRejected) (_result *PromiseBatteryManager)

type PromiseBatteryManagerOnFulfilled Uses

type PromiseBatteryManagerOnFulfilled js.Func

PromiseBatteryManagerOnFulfilled is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromiseBatteryManagerOnFulfilledToJS Uses

func PromiseBatteryManagerOnFulfilledToJS(callback PromiseBatteryManagerOnFulfilledFunc) *PromiseBatteryManagerOnFulfilled

type PromiseBatteryManagerOnFulfilledFunc Uses

type PromiseBatteryManagerOnFulfilledFunc func(value *BatteryManager)

callback: PromiseTemplateOnFulfilled

func PromiseBatteryManagerOnFulfilledFromJS Uses

func PromiseBatteryManagerOnFulfilledFromJS(_value js.Value) PromiseBatteryManagerOnFulfilledFunc

type PromiseBatteryManagerOnRejected Uses

type PromiseBatteryManagerOnRejected js.Func

PromiseBatteryManagerOnRejected is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromiseBatteryManagerOnRejectedToJS Uses

func PromiseBatteryManagerOnRejectedToJS(callback PromiseBatteryManagerOnRejectedFunc) *PromiseBatteryManagerOnRejected

type PromiseBatteryManagerOnRejectedFunc Uses

type PromiseBatteryManagerOnRejectedFunc func(reason js.Value)

callback: PromiseTemplateOnRejected

func PromiseBatteryManagerOnRejectedFromJS Uses

func PromiseBatteryManagerOnRejectedFromJS(_value js.Value) PromiseBatteryManagerOnRejectedFunc

type Union Uses

type Union struct {
    Value js.Value
}

func UnionFromJS Uses

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue Uses

func (u *Union) JSValue() js.Value

Package battery imports 3 packages (graph) and is imported by 1 packages. Updated 2019-09-17. Refresh now. Tools for package owners.