Skip to content

Commit 6af495b

Browse files
committed
Update Previous Version metadata
1 parent 39bea48 commit 6af495b

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Status: ED
55
ED: https://w3c.github.io/ambient-light/
66
Shortname: ambient-light
77
TR: http://www.w3.org/TR/ambient-light/
8-
Previous Version: https://www.w3.org/TR/2017/WD-ambient-light-20170814/
8+
Previous Version: https://www.w3.org/TR/2018/CR-ambient-light-20180320/
99
Editor: Anssi Kostiainen 41974, Intel Corporation, http://intel.com/
1010
Former Editor: Tobie Langel 60809, Codespeaks, formerly on behalf of Intel Corporation, http://tobie.me, [email protected]
1111
Former Editor: Doug Turner, Mozilla Corporation, http://mozilla.com/

index.html

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,9 +1219,9 @@
12191219
background-attachment: fixed;
12201220
}
12211221
</style>
1222-
<meta content="Bikeshed version 9c6ae748322940994300e90a77c34437364b40a6" name="generator">
1222+
<meta content="Bikeshed version 0da7328bb90ef81993146377e4e0fed236969c4c" name="generator">
12231223
<link href="http://www.w3.org/TR/ambient-light/" rel="canonical">
1224-
<meta content="9183ae5cb1bf9ab5ad6069c56f1a5b0517b8dfba" name="document-revision">
1224+
<meta content="39bea48088de9d74d70ddd1b2783f099888d8fe9" name="document-revision">
12251225
<style>/* style-md-lists */
12261226

12271227
/* This is a weird hack for me not yet following the commonmark spec
@@ -1479,15 +1479,15 @@
14791479
<div class="head">
14801480
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
14811481
<h1 class="p-name no-ref" id="title">Ambient Light Sensor</h1>
1482-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2019-01-25">25 January 2019</time></span></h2>
1482+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2019-02-21">21 February 2019</time></span></h2>
14831483
<div data-fill-with="spec-metadata">
14841484
<dl>
14851485
<dt>This version:
14861486
<dd><a class="u-url" href="https://w3c.github.io/ambient-light/">https://w3c.github.io/ambient-light/</a>
14871487
<dt>Latest published version:
14881488
<dd><a href="http://www.w3.org/TR/ambient-light/">http://www.w3.org/TR/ambient-light/</a>
14891489
<dt>Previous Versions:
1490-
<dd><a href="https://www.w3.org/TR/2017/WD-ambient-light-20170814/" rel="prev">https://www.w3.org/TR/2017/WD-ambient-light-20170814/</a>
1490+
<dd><a href="https://www.w3.org/TR/2018/CR-ambient-light-20180320/" rel="prev">https://www.w3.org/TR/2018/CR-ambient-light-20180320/</a>
14911491
<dt>Version History:
14921492
<dd><a href="https://github.com/w3c/ambient-light/commits/gh-pages/index.bs">https://github.com/w3c/ambient-light/commits/gh-pages/index.bs</a>
14931493
<dt>Feedback:
@@ -1604,8 +1604,8 @@ <h2 class="heading settled" data-level="2" id="examples"><span class="secno">2.
16041604
default configuration. Whenever a new <a data-link-type="dfn" href="https://w3c.github.io/sensors/#sensor-reading" id="ref-for-sensor-reading">reading</a> is available,
16051605
it is printed to the console.
16061606
<pre class="highlight"><c- kr>const</c-> sensor <c- o>=</c-> <c- k>new</c-> AmbientLightSensor<c- p>();</c->
1607-
sensor<c- p>.</c->onreading <c- o>=</c-> <c- p>()</c-> <c- o>=></c-> console<c- p>.</c->log<c- p>(</c->sensor<c- p>.</c->illuminance<c- p>);</c->
1608-
sensor<c- p>.</c->onerror <c- o>=</c-> event <c- o>=></c-> console<c- p>.</c->log<c- p>(</c->event<c- p>.</c->error<c- p>.</c->name<c- p>,</c-> event<c- p>.</c->error<c- p>.</c->message<c- p>);</c->
1607+
sensor<c- p>.</c->onreading <c- o>=</c-> <c- p>()</c-> <c- p>=></c-> console<c- p>.</c->log<c- p>(</c->sensor<c- p>.</c->illuminance<c- p>);</c->
1608+
sensor<c- p>.</c->onerror <c- o>=</c-> event <c- p>=></c-> console<c- p>.</c->log<c- p>(</c->event<c- p>.</c->error<c- p>.</c->name<c- p>,</c-> event<c- p>.</c->error<c- p>.</c->message<c- p>);</c->
16091609
sensor<c- p>.</c->start<c- p>();</c->
16101610
</pre>
16111611
</div>
@@ -1615,16 +1615,16 @@ <h2 class="heading settled" data-level="2" id="examples"><span class="secno">2.
16151615
agent has permissions to access ambient light <a data-link-type="dfn" href="https://w3c.github.io/sensors/#sensor-reading" id="ref-for-sensor-reading②">sensor readings</a>. Then,
16161616
the <code class="idl"><a class="idl-code" data-link-type="attribute" href="#dom-ambientlightsensor-illuminance" id="ref-for-dom-ambientlightsensor-illuminance">illuminance</a></code> value is converted to the
16171617
closest exposure value.
1618-
<pre class="highlight">navigator<c- p>.</c->permissions<c- p>.</c->query<c- p>({</c-> name<c- o>:</c-> <c- t>'ambient-light-sensor'</c-> <c- p>}).</c->then<c- p>(</c->result <c- o>=></c-> <c- p>{</c->
1618+
<pre class="highlight">navigator<c- p>.</c->permissions<c- p>.</c->query<c- p>({</c-> name<c- o>:</c-> <c- t>'ambient-light-sensor'</c-> <c- p>}).</c->then<c- p>(</c->result <c- p>=></c-> <c- p>{</c->
16191619
<c- k>if</c-> <c- p>(</c->result<c- p>.</c->state <c- o>===</c-> <c- t>'denied'</c-><c- p>)</c-> <c- p>{</c->
16201620
console<c- p>.</c->log<c- p>(</c-><c- t>'Permission to use ambient light sensor is denied.'</c-><c- p>);</c->
16211621
<c- k>return</c-><c- p>;</c->
16221622
<c- p>}</c->
16231623

16241624
<c- kr>const</c-> als <c- o>=</c-> <c- k>new</c-> AmbientLightSensor<c- p>({</c->frequency<c- o>:</c-> <c- mi>20</c-><c- p>});</c->
1625-
als<c- p>.</c->addEventListener<c- p>(</c-><c- t>'activate'</c-><c- p>,</c-> <c- p>()</c-> <c- o>=></c-> console<c- p>.</c->log<c- p>(</c-><c- t>'Ready to measure EV.'</c-><c- p>));</c->
1626-
als<c- p>.</c->addEventListener<c- p>(</c-><c- t>'error'</c-><c- p>,</c-> event <c- o>=></c-> console<c- p>.</c->log<c- p>(</c-><c- sb>`Error: </c-><c- si>${</c->event<c- p>.</c->error<c- p>.</c->name<c- si>}</c-><c- sb>`</c-><c- p>));</c->
1627-
als<c- p>.</c->addEventListener<c- p>(</c-><c- t>'reading'</c-><c- p>,</c-> <c- p>()</c-> <c- o>=></c-> <c- p>{</c->
1625+
als<c- p>.</c->addEventListener<c- p>(</c-><c- t>'activate'</c-><c- p>,</c-> <c- p>()</c-> <c- p>=></c-> console<c- p>.</c->log<c- p>(</c-><c- t>'Ready to measure EV.'</c-><c- p>));</c->
1626+
als<c- p>.</c->addEventListener<c- p>(</c-><c- t>'error'</c-><c- p>,</c-> event <c- p>=></c-> console<c- p>.</c->log<c- p>(</c-><c- sb>`Error: </c-><c- si>${</c->event<c- p>.</c->error<c- p>.</c->name<c- si>}</c-><c- sb>`</c-><c- p>));</c->
1627+
als<c- p>.</c->addEventListener<c- p>(</c-><c- t>'reading'</c-><c- p>,</c-> <c- p>()</c-> <c- p>=></c-> <c- p>{</c->
16281628
<c- c1>// Defaut ISO value.</c->
16291629
<c- kr>const</c-> ISO <c- o>=</c-> <c- mi>100</c-><c- p>;</c->
16301630
<c- c1>// Incident-light calibration constant.</c->
@@ -1643,7 +1643,7 @@ <h2 class="heading settled" data-level="2" id="examples"><span class="secno">2.
16431643
to recommended workplace light levels.
16441644
<pre class="highlight"><c- kr>const</c-> als <c- o>=</c-> <c- k>new</c-> AmbientLightSensor<c- p>();</c->
16451645

1646-
als<c- p>.</c->onreading <c- o>=</c-> <c- p>()</c-> <c- o>=></c-> <c- p>{</c->
1646+
als<c- p>.</c->onreading <c- o>=</c-> <c- p>()</c-> <c- p>=></c-> <c- p>{</c->
16471647
<c- a>let</c-> str <c- o>=</c-> luxToWorkplaceLevel<c- p>(</c->als<c- p>.</c->illuminance<c- p>);</c->
16481648
<c- k>if</c-> <c- p>(</c->str<c- p>)</c-> <c- p>{</c->
16491649
console<c- p>.</c->log<c- p>(</c-><c- sb>`Light level is suitable for: </c-><c- si>${</c->str<c- si>}</c-><c- sb>.`</c-><c- p>);</c->
@@ -1757,7 +1757,7 @@ <h2 class="heading settled" data-level="7" id="automation"><span class="secno">7
17571757
This section extends the <a data-link-type="dfn" href="https://w3c.github.io/sensors/#automation" id="ref-for-automation">automation</a> section defined in the Generic Sensor API <a data-link-type="biblio" href="#biblio-generic-sensor">[GENERIC-SENSOR]</a> to provide mocking information about the ambient light levels for the purposes of testing a user agent’s
17581758
implementation of <a data-link-type="dfn" href="#ambient-light-sensor" id="ref-for-ambient-light-sensor②">Ambient Light Sensor</a>.
17591759
<h3 class="heading settled" data-level="7.1" id="mock-ambient-light-sensor-type"><span class="secno">7.1. </span><span class="content">Mock Sensor Type</span><a class="self-link" href="#mock-ambient-light-sensor-type"></a></h3>
1760-
<p>The <code class="idl"><a data-link-type="idl" href="#ambientlightsensor" id="ref-for-ambientlightsensor⑥">AmbientLightSensor</a></code> class has an associated <a data-link-type="dfn" href="https://w3c.github.io/sensors/#mock-sensor-type" id="ref-for-mock-sensor-type">mock sensor type</a> which is <a class="idl-code" data-link-type="enum-value">"ambient-light"</a>, its <a data-link-type="dfn" href="https://w3c.github.io/sensors/#mock-sensor-reading-values" id="ref-for-mock-sensor-reading-values">mock sensor reading values</a> dictionary is defined as follow:</p>
1760+
<p>The <code class="idl"><a data-link-type="idl" href="#ambientlightsensor" id="ref-for-ambientlightsensor⑥">AmbientLightSensor</a></code> class has an associated <a data-link-type="dfn" href="https://w3c.github.io/sensors/#mock-sensor-type" id="ref-for-mock-sensor-type">mock sensor type</a> which is <a class="idl-code" data-link-type="enum-value" href="https://w3c.github.io/sensors/#dom-mocksensortype-ambient-light" id="ref-for-dom-mocksensortype-ambient-light">"ambient-light"</a>, its <a data-link-type="dfn" href="https://w3c.github.io/sensors/#mock-sensor-reading-values" id="ref-for-mock-sensor-reading-values">mock sensor reading values</a> dictionary is defined as follow:</p>
17611761
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="idl-code" data-dfn-type="dictionary" data-export id="dictdef-ambientlightreadingvalues"><code><c- g>AmbientLightReadingValues</c-></code><a class="self-link" href="#dictdef-ambientlightreadingvalues"></a></dfn> {
17621762
<c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double①"><c- b>double</c-></a>? <dfn class="idl-code" data-dfn-for="AmbientLightReadingValues" data-dfn-type="dict-member" data-export data-type="double? " id="dom-ambientlightreadingvalues-illuminance"><code><c- g>illuminance</c-></code><a class="self-link" href="#dom-ambientlightreadingvalues-illuminance"></a></dfn>;
17631763
};
@@ -1818,6 +1818,12 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
18181818
<li><a href="#dom-ambientlightreadingvalues-illuminance">dict-member for AmbientLightReadingValues</a><span>, in §7.1</span>
18191819
</ul>
18201820
</ul>
1821+
<aside class="dfn-panel" data-for="term-for-dom-mocksensortype-ambient-light">
1822+
<a href="https://w3c.github.io/sensors/#dom-mocksensortype-ambient-light">https://w3c.github.io/sensors/#dom-mocksensortype-ambient-light</a><b>Referenced in:</b>
1823+
<ul>
1824+
<li><a href="#ref-for-dom-mocksensortype-ambient-light">7.1. Mock Sensor Type</a>
1825+
</ul>
1826+
</aside>
18211827
<aside class="dfn-panel" data-for="term-for-sensor">
18221828
<a href="https://w3c.github.io/sensors/#sensor">https://w3c.github.io/sensors/#sensor</a><b>Referenced in:</b>
18231829
<ul>
@@ -1970,6 +1976,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
19701976
<li>
19711977
<a data-link-type="biblio">[GENERIC-SENSOR]</a> defines the following terms:
19721978
<ul>
1979+
<li><span class="dfn-paneled" id="term-for-dom-mocksensortype-ambient-light" style="color:initial">"ambient-light"</span>
19731980
<li><span class="dfn-paneled" id="term-for-sensor" style="color:initial">Sensor</span>
19741981
<li><span class="dfn-paneled" id="term-for-dictdef-sensoroptions" style="color:initial">SensorOptions</span>
19751982
<li><span class="dfn-paneled" id="term-for-automation" style="color:initial">automation</span>

0 commit comments

Comments
 (0)