Skip to Content

batteryData()

Detect and store the user’s battery data.

JavaScript July 2, 2019

Usage

JavaScript
nebula.batteryData(battery)

Parameters

battery
(Required) (Object) The getBattery() object
Default: None

Parameter Notes

This function is called automatically, so it is not needed to call manually. See below for the object that it updates and the trigger it provides.

Request or provide clarification »

Additional Notes

On battery state changes, this function updates the nebula.user.client.device.battery object and then triggers batteryChange.

Source File

This function was not found in /assets/js/nebula.js. Please report this error.

Override

To override or disable this JavaScript function, simply redeclare it with the exact same function name.

JavaScript
function batteryData(battery){
    //Write your own code here, leave it blank, or return false.
}