Liking cljdoc? Tell your friends :D

web.device.BatteryManager

The BatteryManager interface provides ways to get information the system's battery charge level.

The BatteryManager interface provides ways to get information
the system's battery charge level.
raw docstring

add-event-listenercljs

(add-event-listener this & args)

Method.

The web.EventTarget method addEventListener() sets up a function will be called whenever the specified event is delivered to the

target.addEventListener(type, listener[, options]); target.addEventListener(type, listener[, useCapture]); target.addEventListener(type, listener[, useCapture, wantsUntrusted ]); // Gecko/Mozilla only

See also: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener

Method.

The `web.EventTarget` method addEventListener() sets up a function
will be called whenever the specified event is delivered to the

`target.addEventListener(type, listener[, options]);
target.addEventListener(type, listener[, useCapture]);
target.addEventListener(type, listener[, useCapture, wantsUntrusted  ]); // Gecko/Mozilla only`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener`
sourceraw docstring

chargingcljs

(charging this)

Property.

[Read Only] [Obsolute]

A Boolean value indicating whether or not the device's battery currently being charged.

`var charging = battery.charging

On return, charging indicates whether or not the battery, which is a web.device.BatteryManager object, is currently being charged; if the battery is charging, this value is true. Otherwise, the value is false.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/charging

Property.

[Read Only]
[Obsolute]

A Boolean value indicating whether or not the device's battery
currently being charged.

`var charging = battery.charging

On return, charging indicates whether or not the battery, which is a `web.device.BatteryManager` object, is currently being charged; if the battery is charging, this value is true. Otherwise, the value is false.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/charging`
sourceraw docstring

charging-timecljs

(charging-time this)

Property.

[Read Only] [Obsolute]

Indicates the amount of time, in seconds, that remain until the is fully charged.

`var time = battery.chargingTime

On return, time is the remaining time in seconds until the battery, which is a web.device.BatteryManager object, is fully charged, or 0 if the battery is already fully charged. If the battery is currently discharging, this value is Infinity.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/chargingTime

Property.

[Read Only]
[Obsolute]

Indicates the amount of time, in seconds, that remain until the
is fully charged.

`var time = battery.chargingTime

On return, time is the remaining time in seconds until the battery, which is a `web.device.BatteryManager` object, is fully charged, or 0 if the battery is already fully charged. If the battery is currently discharging, this value is Infinity.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/chargingTime`
sourceraw docstring

discharging-timecljs

(discharging-time this)

Property.

[Read Only] [Obsolute]

Indicates the amount of time, in seconds, that remains until battery is fully discharged.

`var time = battery.dischargingTime

On return, time is the remaining time in seconds until the battery, which is a web.device.BatteryManager object, is fully discharged and the system will suspend. This value is Infinity if the battery is currently charging rather than discharging, or if the system is unable to report the remaining discharging time.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/dischargingTime

Property.

[Read Only]
[Obsolute]

Indicates the amount of time, in seconds, that remains until
battery is fully discharged.

`var time = battery.dischargingTime

On return, time is the remaining time in seconds until the battery, which is a `web.device.BatteryManager` object, is fully discharged and the system will suspend. This value is Infinity if the battery is currently charging rather than discharging, or if the system is unable to report the remaining discharging time.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/dischargingTime`
sourceraw docstring

dispatch-eventcljs

(dispatch-event this event)

Method.

Dispatches an web.Event at the specified web.EventTarget, invoking the affected web.other.EventListeners in the appropriate The normal event processing rules (including the capturing and bubbling phase) also apply to events dispatched manually with

cancelled = !target.dispatchEvent(event)

See also: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent

Method.

Dispatches an `web.Event` at the specified `web.EventTarget`,
invoking the affected `web.other.EventListener`s in the appropriate
The normal event processing rules (including the capturing and
bubbling phase) also apply to events dispatched manually with

`cancelled = !target.dispatchEvent(event)`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent`
sourceraw docstring

levelcljs

(level this)

Property.

[Read Only] [Obsolute]

Indicates the current battery charge level as a value between and 1.0.

`var level = battery.level

On return, level is a number representing the system's battery charge level scaled to a value between 0.0 and 1.0. A value of 0 means the battery, which is a web.device.BatteryManager object, is empty and the system is about to be suspended. A value of 1.0 means the battery is full. A value of 1.0 is also returned if the implementation isn't able to determine the battery charge level or if the system is not battery-powered.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/level

Property.

[Read Only]
[Obsolute]

Indicates the current battery charge level as a value between
and 1.0.

`var level = battery.level

On return, level is a number representing the system's battery charge level scaled to a value between 0.0 and 1.0. A value of 0 means the battery, which is a `web.device.BatteryManager` object, is empty and the system is about to be suspended. A value of 1.0 means the battery is full. A value of 1.0 is also returned if the implementation isn't able to determine the battery charge level or if the system is not battery-powered.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/level`
sourceraw docstring

onchargingchangecljs

(onchargingchange this)

Property.

[Obsolute]

Specifies an event listener to receive chargingchange events. events occur when the battery charging state is updated.

`battery.onchargingchange = funcRef

Where battery is a web.device.BatteryManager object, and funcRef is a function to be called when the chargingchange event occurs.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingchange

Property.

[Obsolute]

Specifies an event listener to receive chargingchange events.
events occur when the battery `charging` state is updated.

`battery.onchargingchange = funcRef

Where battery is a `web.device.BatteryManager` object, and funcRef is a function to be called when the chargingchange event occurs.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingchange`
sourceraw docstring

onchargingtimechangecljs

(onchargingtimechange this)

Property.

[Obsolute]

Specifies an event listener to receive chargingtimechange events. events occur when the battery chargingTime is updated.

`battery.onchargingtimechange = funcRef

Where battery is a web.device.BatteryManager object, and funcRef is a function to be called when the chargingtimechange event occurs.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingtimechange

Property.

[Obsolute]

Specifies an event listener to receive chargingtimechange events.
events occur when the battery `chargingTime` is updated.

`battery.onchargingtimechange = funcRef

Where battery is a `web.device.BatteryManager` object, and funcRef is a function to be called when the chargingtimechange event occurs.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingtimechange`
sourceraw docstring

ondischargingtimechangecljs

(ondischargingtimechange this)

Property.

[Obsolute]

Specifies an event listener to receive dischargingtimechange These events occur when the battery dischargingTime is updated.

`battery.ondischargingtimechange = funcRef

Where battery is a web.device.BatteryManager object, and funcRef is a function to be called when the dischargingtimechange event occurs.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/ondischargingtimechange

Property.

[Obsolute]

Specifies an event listener to receive dischargingtimechange
These events occur when the battery `dischargingTime` is updated.

`battery.ondischargingtimechange = funcRef

Where battery is a `web.device.BatteryManager` object, and funcRef is a function to be called when the dischargingtimechange event occurs.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/ondischargingtimechange`
sourceraw docstring

onlevelchangecljs

(onlevelchange this)

Property.

[Obsolute]

The BatteryManager.onlevelchange property specifies an event to receive levelchange events. These events occur when the battery is updated.

`navigator.battery.onlevelchange = funcRef

Where battery is a web.device.BatteryManager object, and funcRef is a function to be called when the levelchange event occurs.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onlevelchange

Property.

[Obsolute]

The BatteryManager.onlevelchange property specifies an event
to receive levelchange events. These events occur when the battery
is updated.

`navigator.battery.onlevelchange = funcRef

Where battery is a `web.device.BatteryManager` object, and funcRef is a function to be called when the levelchange event occurs.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onlevelchange`
sourceraw docstring

remove-event-listenercljs

(remove-event-listener this & args)

Method.

The EventTarget.removeEventListener() method removes from the an event listener previously registered with EventTarget.addEventListener(). event listener to be removed is identified using a combination the event type, the event listener function itself, and various options that may affect the matching process; see Matching event for removal

target.removeEventListener(type, listener[, options]); target.removeEventListener(type, listener[, useCapture]);

See also: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener

Method.

The EventTarget.removeEventListener() method removes from the
an event listener previously registered with `EventTarget.addEventListener()`.
event listener to be removed is identified using a combination
the event type, the event listener function itself, and various
options that may affect the matching process; see Matching event
for removal

`target.removeEventListener(type, listener[, options]);
target.removeEventListener(type, listener[, useCapture]);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener`
sourceraw docstring

set-onchargingchange!cljs

(set-onchargingchange! this val)

Property.

[Obsolute]

Specifies an event listener to receive chargingchange events. events occur when the battery charging state is updated.

`battery.onchargingchange = funcRef

Where battery is a web.device.BatteryManager object, and funcRef is a function to be called when the chargingchange event occurs.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingchange

Property.

[Obsolute]

Specifies an event listener to receive chargingchange events.
events occur when the battery `charging` state is updated.

`battery.onchargingchange = funcRef

Where battery is a `web.device.BatteryManager` object, and funcRef is a function to be called when the chargingchange event occurs.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingchange`
sourceraw docstring

set-onchargingtimechange!cljs

(set-onchargingtimechange! this val)

Property.

[Obsolute]

Specifies an event listener to receive chargingtimechange events. events occur when the battery chargingTime is updated.

`battery.onchargingtimechange = funcRef

Where battery is a web.device.BatteryManager object, and funcRef is a function to be called when the chargingtimechange event occurs.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingtimechange

Property.

[Obsolute]

Specifies an event listener to receive chargingtimechange events.
events occur when the battery `chargingTime` is updated.

`battery.onchargingtimechange = funcRef

Where battery is a `web.device.BatteryManager` object, and funcRef is a function to be called when the chargingtimechange event occurs.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingtimechange`
sourceraw docstring

set-ondischargingtimechange!cljs

(set-ondischargingtimechange! this val)

Property.

[Obsolute]

Specifies an event listener to receive dischargingtimechange These events occur when the battery dischargingTime is updated.

`battery.ondischargingtimechange = funcRef

Where battery is a web.device.BatteryManager object, and funcRef is a function to be called when the dischargingtimechange event occurs.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/ondischargingtimechange

Property.

[Obsolute]

Specifies an event listener to receive dischargingtimechange
These events occur when the battery `dischargingTime` is updated.

`battery.ondischargingtimechange = funcRef

Where battery is a `web.device.BatteryManager` object, and funcRef is a function to be called when the dischargingtimechange event occurs.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/ondischargingtimechange`
sourceraw docstring

set-onlevelchange!cljs

(set-onlevelchange! this val)

Property.

[Obsolute]

The BatteryManager.onlevelchange property specifies an event to receive levelchange events. These events occur when the battery is updated.

`navigator.battery.onlevelchange = funcRef

Where battery is a web.device.BatteryManager object, and funcRef is a function to be called when the levelchange event occurs.`

See also: https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onlevelchange

Property.

[Obsolute]

The BatteryManager.onlevelchange property specifies an event
to receive levelchange events. These events occur when the battery
is updated.

`navigator.battery.onlevelchange = funcRef

Where battery is a `web.device.BatteryManager` object, and funcRef is a function to be called when the levelchange event occurs.`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onlevelchange`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close