You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Lisa Seacat DeLuca (JIRA)" <ji...@apache.org> on 2014/09/18 18:50:33 UTC
[jira] [Updated] (CB-7591) Cordova W3C Battery Alignment - multiple
batteries
[ https://issues.apache.org/jira/browse/CB-7591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lisa Seacat DeLuca updated CB-7591:
-----------------------------------
Description:
JIRA parent issue: https://issues.apache.org/jira/browse/CB-6065
Cordova documentation: https://github.com/apache/cordova-plugin-battery-status/blob/master/doc/index.md
w3c spec: http://www.w3.org/TR/battery-status
Gap analysis document can be found here: https://docs.google.com/document/d/1mAcjwf39IcIqpIuS-7SzlDxTgk4OebCHae6yfOwnStE/edit?usp=sharing
Multiple Batteries. BatteryManager should expose a unified view of the batteries. See individual property sub-bullets for more information on how to handle multiple batteries for each property
was:
JIRA parent issue: https://issues.apache.org/jira/browse/CB-6065
Cordova documentation: https://github.com/apache/cordova-plugin-battery-status/blob/master/doc/index.md
w3c spec: http://www.w3.org/TR/battery-status
Gap analysis document can be found here: https://docs.google.com/document/d/1mAcjwf39IcIqpIuS-7SzlDxTgk4OebCHae6yfOwnStE/edit?usp=sharing
levelchange event. When the battery level is updated, the user agent mustqueue a task which sets the level attribute's value and fires a simple eventnamed levelchange at the BatteryManager object.
event handler: onlevelchange
Example:
// We get the initial value when the promise resolves ...
navigator.getBattery().then(function(battery) {
console.log(battery.level);
// ... and any subsequent updates.
battery.onlevelchange = function() {
console.log(this.level);
};
});
Example 2 (Alternative):
navigator.getBattery().then(function(battery) {
console.log(battery.level);
battery.addEventListener('levelchange', function() {
console.log(this.level);
});
});
> Cordova W3C Battery Alignment - multiple batteries
> --------------------------------------------------
>
> Key: CB-7591
> URL: https://issues.apache.org/jira/browse/CB-7591
> Project: Apache Cordova
> Issue Type: Sub-task
> Components: Plugin Battery Status
> Reporter: Lisa Seacat DeLuca
>
> JIRA parent issue: https://issues.apache.org/jira/browse/CB-6065
> Cordova documentation: https://github.com/apache/cordova-plugin-battery-status/blob/master/doc/index.md
> w3c spec: http://www.w3.org/TR/battery-status
> Gap analysis document can be found here: https://docs.google.com/document/d/1mAcjwf39IcIqpIuS-7SzlDxTgk4OebCHae6yfOwnStE/edit?usp=sharing
> Multiple Batteries. BatteryManager should expose a unified view of the batteries. See individual property sub-bullets for more information on how to handle multiple batteries for each property
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)