Skip to Content

Deprecated

batteryData()

Detect and store the user’s battery data.

JavaScript February 7, 2021

Deprecated

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.