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.

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.

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.

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.

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.

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.

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

levelcljs

(level this)

Property.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

set-charging!cljs

(set-charging! this val)

Property.

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.

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

set-charging-time!cljs

(set-charging-time! this val)

Property.

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.

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

set-discharging-time!cljs

(set-discharging-time! this val)

Property.

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.

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

set-level!cljs

(set-level! this val)

Property.

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.

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

set-onchargingchange!cljs

(set-onchargingchange! this val)

Property.

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.

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.

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.

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.

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.

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.

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.

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