battery

package
v0.0.0-...-41cedfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatteryManager

type BatteryManager struct {
	domcore.EventTarget
}

class: BatteryManager

func BatteryManagerFromJS

func BatteryManagerFromJS(value js.Value) *BatteryManager

BatteryManagerFromJS is casting a js.Value into BatteryManager.

func BatteryManagerFromWrapper

func BatteryManagerFromWrapper(input core.Wrapper) *BatteryManager

BatteryManagerFromJS is casting from something that holds a js.Value into BatteryManager.

func (*BatteryManager) AddEventChargingChange

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

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

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

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

func (_this *BatteryManager) Charging() bool

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

func (*BatteryManager) ChargingTime

func (_this *BatteryManager) ChargingTime() float64

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

func (*BatteryManager) DischargingTime

func (_this *BatteryManager) DischargingTime() float64

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

func (*BatteryManager) Level

func (_this *BatteryManager) Level() float64

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

func (*BatteryManager) OnChargingChange

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

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

func (*BatteryManager) OnChargingTimeChange

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

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

func (*BatteryManager) OnDischargingTimeChange

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

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

func (*BatteryManager) OnLevelChange

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

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

func (*BatteryManager) SetOnChargingChange

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

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

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

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

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

class: Promise

func PromiseBatteryManagerFromJS

func PromiseBatteryManagerFromJS(value js.Value) *PromiseBatteryManager

PromiseBatteryManagerFromJS is casting a js.Value into PromiseBatteryManager.

func PromiseBatteryManagerFromWrapper

func PromiseBatteryManagerFromWrapper(input core.Wrapper) *PromiseBatteryManager

PromiseBatteryManagerFromJS is casting from something that holds a js.Value into PromiseBatteryManager.

func (*PromiseBatteryManager) Catch

func (*PromiseBatteryManager) Finally

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

func (*PromiseBatteryManager) JSValue

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

JSValue returns the js.Value or js.Null() if _this is nil

func (*PromiseBatteryManager) Then

type PromiseBatteryManagerOnFulfilled

type PromiseBatteryManagerOnFulfilled js.Func

PromiseBatteryManagerOnFulfilled is a javascript function type.

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

type PromiseBatteryManagerOnFulfilledFunc

type PromiseBatteryManagerOnFulfilledFunc func(value *BatteryManager)

callback: PromiseTemplateOnFulfilled

func PromiseBatteryManagerOnFulfilledFromJS

func PromiseBatteryManagerOnFulfilledFromJS(_value js.Value) PromiseBatteryManagerOnFulfilledFunc

type PromiseBatteryManagerOnRejected

type PromiseBatteryManagerOnRejected js.Func

PromiseBatteryManagerOnRejected is a javascript function type.

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

type PromiseBatteryManagerOnRejectedFunc

type PromiseBatteryManagerOnRejectedFunc func(reason js.Value)

callback: PromiseTemplateOnRejected

func PromiseBatteryManagerOnRejectedFromJS

func PromiseBatteryManagerOnRejectedFromJS(_value js.Value) PromiseBatteryManagerOnRejectedFunc

type Union

type Union struct {
	Value js.Value
}

func UnionFromJS

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL