--- a/battery/Overview.html Mon Aug 11 11:01:32 2014 +0300
+++ b/battery/Overview.html Mon Aug 11 11:06:53 2014 +0300
@@ -48,7 +48,7 @@
}
code {
- color: #ff4500;
+ color: #C83500;
}
/* --- TOC --- */
@@ -436,7 +436,7 @@
</p>
<h1 class="title p-name" id="title" property="dcterms:title">Battery Status API</h1>
- <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-07-03T09:06:22.000Z" id="w3c-editor-s-draft-03-july-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-07-03">03 July 2014</time></h2>
+ <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-08-11T04:58:01.000Z" id="w3c-editor-s-draft-11-august-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-08-11">11 August 2014</time></h2>
<dl>
<dt>This version:</dt>
@@ -587,6 +587,10 @@
</p>
+ <p>This document is governed by the <a id="w3c_process_revision" href="http://www.w3.org/2014/Process-20140801/">1 August 2014 <abbr title="World Wide Web Consortium">W3C</abbr> Process Document</a>.
+ </p>
+
+
@@ -666,7 +670,7 @@
</ul>
<p>
<a href="http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects">
- Promise objects</a> are defined in [<cite><a class="bibref" href="#bib-ECMASCRIPT">ECMASCRIPT</a></cite>].
+ <dfn id="dfn-promise">Promise</dfn></a> objects are defined in [<cite><a class="bibref" href="#bib-ECMASCRIPT">ECMASCRIPT</a></cite>].
</p>
</section>
<section class="informative" id="security-and-privacy-considerations">
@@ -686,26 +690,40 @@
<span class="idlMethod"> <span class="idlMethType">Promise<<a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a>></span> <span class="idlMethName"><a href="#widl-Navigator-getBattery-Promise-BatteryManager">getBattery</a></span> ();</span>
};</span></pre>
<p>
- The <code>getBattery()</code> method, when invoked, <em class="rfc2119" title="MUST">MUST</em> run the
- following steps:
+ The <code id="widl-Navigator-getBattery-Promise-BatteryManager">getBattery()</code>
+ method, when invoked, <em class="rfc2119" title="MUST">MUST</em> run the following steps:
</p>
<ul>
- <li>Let <var><dfn id="dfn-promise">promise</dfn></var> be a newly created Promise and
- return it.
+ <li>
+ If there is an initialized <a href="#dfn-promise" class="internalDFN">Promise</a> object returned by
+ <code>getBattery()</code>, let <var>promise</var> be that
+ <a href="#dfn-promise" class="internalDFN">Promise</a> object.
</li>
- <li>If an instance of <a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a> has previously been
- created in the current <a href="#dfn-browsing-context" class="internalDFN">browsing context</a>, let <var>battery</var>
- be the previously created instance.</li>
- <li>Otherwise, let <var>battery</var> be a new instance of
- <a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a>.</li>
- <li><dfn id="dfn-resolve">Resolve</dfn> <var>promise</var> with <var>battery</var>.</li>
+ <li>
+ Otherwise, let <var>promise</var> be a newly created <a href="#dfn-promise" class="internalDFN">Promise</a>.
+ </li>
+ <li>
+ Return <var>promise</var>.
+ </li>
+ <li>
+ If an instance of <a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a> has previously been
+ created in the current <a href="#dfn-browsing-context" class="internalDFN">browsing context</a>, let <var>battery</var>
+ be the previously created instance.
+ </li>
+ <li>
+ Otherwise, let <var>battery</var> be a new instance of
+ <a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a>.
+ </li>
+ <li>
+ <dfn id="dfn-resolve">Resolve</dfn> <var>promise</var> with <var>battery</var>.
+ </li>
</ul>
<p>
- The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> reject the promise returned by
+ The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="MUST NOT">MUST NOT</em> reject the promise returned by
<code>getBattery()</code>. If the <a href="#dfn-user-agent" class="internalDFN">user agent</a> does not want to
- expose the battery information to the web page, it is <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em> to
- not expose <code>getBattery()</code> or resolve the promise with an
- instance of <a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a> exposing only <a href="#dfn-default-values" class="internalDFN">default values</a>.
+ expose the battery information to the web page, it <em class="rfc2119" title="MUST">MUST</em> resolve the
+ promise with an instance of <a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a> exposing only
+ <a href="#dfn-default-values" class="internalDFN">default values</a>.
</p>
</section>
@@ -752,7 +770,8 @@
for fingerprinting.
</p></div>
<p>
- The <code>charging</code> attribute <em class="rfc2119" title="MUST">MUST</em> be set to false if the battery
+ The <code id="widl-BatteryManager-charging">charging</code>
+ attribute <em class="rfc2119" title="MUST">MUST</em> be set to false if the battery
is discharging, and set to true, if the battery is charging, the
implementation is unable to report the state, or there is no battery
attached to the system, or otherwise. When the battery charging state
@@ -762,7 +781,8 @@
<a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a> object.
</p>
<p>
- The <code>chargingTime</code> attribute <em class="rfc2119" title="MUST">MUST</em> be set to 0, if the
+ The <code id="widl-BatteryManager-chargingTime">chargingTime</code>
+ attribute <em class="rfc2119" title="MUST">MUST</em> be set to 0, if the
battery is full or there is no battery attached to the system, and to
the value positive Infinity if the battery is discharging, the
implementation is unable to report the remaining charging time, or
@@ -773,7 +793,8 @@
<a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a> object.
</p>
<p>
- The <code>dischargingTime</code> attribute <em class="rfc2119" title="MUST">MUST</em> be set to the value
+ The <code id="widl-BatteryManager-dischargingTime">dischargingTime</code>
+ attribute <em class="rfc2119" title="MUST">MUST</em> be set to the value
positive Infinity, if the battery is charging, the implementation is
unable to report the remaining discharging time, there is no battery
attached to the system, or otherwise. When the battery discharging time
@@ -783,7 +804,8 @@
<a href="#idl-def-BatteryManager" class="idlType"><code>BatteryManager</code></a> object.
</p>
<p>
- The <code>level</code> attribute <em class="rfc2119" title="MUST">MUST</em> be set to 0 if the system's
+ The <code id="widl-BatteryManager-level">level</code>
+ attribute <em class="rfc2119" title="MUST">MUST</em> be set to 0 if the system's
battery is depleted and the system is about to be suspended, and to
1.0 if the battery is full, the implementation is unable to report the
battery's level, or there is no battery attached to the system. When
@@ -841,20 +863,52 @@
</thead>
<tbody>
<tr>
- <td><strong><code>onchargingchange</code></strong></td>
- <td><code><dfn id="dfn-chargingchange">chargingchange</dfn></code></td>
+ <td>
+ <strong><code id="widl-BatteryManager-onchargingchange">
+ onchargingchange
+ </code></strong>
+ </td>
+ <td>
+ <code><dfn id="dfn-chargingchange">
+ chargingchange
+ </dfn></code>
+ </td>
</tr>
<tr>
- <td><strong><code>onchargingtimechange</code></strong></td>
- <td><code><dfn id="dfn-chargingtimechange">chargingtimechange</dfn></code></td>
+ <td>
+ <strong><code id="widl-BatteryManager-onchargingtimechange">
+ onchargingtimechange
+ </code></strong>
+ </td>
+ <td>
+ <code><dfn id="dfn-chargingtimechange">
+ chargingtimechange
+ </dfn></code>
+ </td>
</tr>
<tr>
- <td><strong><code>ondischargingtimechange</code></strong></td>
- <td><code><dfn id="dfn-dischargingtimechange">dischargingtimechange</dfn></code></td>
+ <td>
+ <strong><code id="widl-BatteryManager-ondischargingtimechange">
+ ondischargingtimechange
+ </code></strong>
+ </td>
+ <td>
+ <code><dfn id="dfn-dischargingtimechange">
+ dischargingtimechange
+ </dfn></code>
+ </td>
</tr>
<tr>
- <td><strong><code>onlevelchange</code></strong></td>
- <td><code><dfn id="dfn-levelchange">levelchange</dfn></code></td>
+ <td>
+ <strong><code id="widl-BatteryManager-onlevelchange">
+ onlevelchange
+ </code></strong>
+ </td>
+ <td>
+ <code><dfn id="dfn-levelchange">
+ levelchange
+ </dfn></code>
+ </td>
</tr>
</tbody>
</table>