- From: Anssi Kostiainen via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 04 Nov 2011 15:53:39 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/system-info In directory hutz:/tmp/cvs-serv5336 Modified Files: battery-status.html Log Message: make intro example functional if the implementation is unable to report the remaining discharging time; editorial: reword dischargingTime prose Index: battery-status.html =================================================================== RCS file: /sources/public/2009/dap/system-info/battery-status.html,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- battery-status.html 2 Nov 2011 23:47:49 -0000 1.65 +++ battery-status.html 4 Nov 2011 15:53:37 -0000 1.66 @@ -146,12 +146,12 @@ var battery = navigator.battery; battery.addEventListener('dischargingtimechange', function () { - if (battery.dischargingTime < 60 * 30) { + if (battery.dischargingTime < 60 * 30 || battery.level < 0.1) { mail.setTimer(mail.INTERVAL_BATTERY_LOW); - console.log('30 minutes remaining, checking the server less frequently.'); - } else if (battery.dischargingTime < 60 * 10) { + console.log('30 minutes remaining or level below 10%, checking the server less frequently.'); + } else if (battery.dischargingTime < 60 * 10 || battery.level < 0.05) { mail.setTimer(null); - console.log('10 minutes remaining, stop checking the server.'); + console.log('10 minutes remaining or level below 5%, stop checking the server.'); } }, false); @@ -225,8 +225,9 @@ Represents the time remaining in seconds until the system's battery is completely discharged and the system is about to be suspended. The attribute MUST be set to the value positive Infinity, if the battery - is charging, the implementation is unable to report the time - remaining, there is no battery attached to the system, or otherwise. + is charging, the implementation is unable to report the remaining + discharging time, there is no battery attached to the system, or + otherwise. </dd> <dt>attribute Function? onchargingchange</dt> <dd>
Received on Friday, 4 November 2011 15:55:44 UTC