Skip to content

Commit 92e18fb

Browse files
authored
Merge pull request #51 from w3c/link-checker
Fix broken fragments, avoid redundant redirects
2 parents 33ef276 + ce6a636 commit 92e18fb

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

index.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Boilerplate: omit issues-index, omit conformance
2525
Default Biblio Status: current
2626
</pre>
2727
<pre class="anchors">
28-
urlPrefix: https://w3c.github.io/sensors; spec: GENERIC-SENSOR
28+
urlPrefix: https://w3c.github.io/sensors/; spec: GENERIC-SENSOR
2929
type: dfn
3030
text: high-level
3131
text: default sensor
@@ -39,7 +39,7 @@ urlPrefix: https://w3c.github.io/sensors; spec: GENERIC-SENSOR
3939
text: mitigation strategies; url: mitigation-strategies
4040
text: sampling frequency
4141
text: sensor type
42-
text: sensor readings
42+
text: sensor reading
4343
text: check sensor policy-controlled features; url: check-sensor-policy-controlled-features
4444
text: sensor permission name; url: sensor-permission-names
4545
</pre>

index.html

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@
11851185
</style>
11861186
<meta content="Bikeshed version 66a76cd06d4fa9e491630583356008a71a166760" name="generator">
11871187
<link href="http://www.w3.org/TR/ambient-light/" rel="canonical">
1188-
<meta content="261780999fcbe190d71b212b326409b8e90c78be" name="document-revision">
1188+
<meta content="33ef27609211224c7c615532d22f6d5c4f804f2f" name="document-revision">
11891189
<style>/* style-md-lists */
11901190

11911191
/* This is a weird hack for me not yet following the commonmark spec
@@ -1432,7 +1432,7 @@
14321432
<div class="head">
14331433
<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>
14341434
<h1 class="p-name no-ref" id="title">Ambient Light Sensor</h1>
1435-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2018-03-01">1 March 2018</time></span></h2>
1435+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2018-03-15">15 March 2018</time></span></h2>
14361436
<div data-fill-with="spec-metadata">
14371437
<dl>
14381438
<dt>This version:
@@ -1543,13 +1543,13 @@ <h3 class="heading settled" data-level="1.1" id="scope"><span class="secno">1.1.
15431543
sampled at high frequencies.</p>
15441544
<p>Common use cases relying on a small set of illuminance values, such as styling
15451545
webpages according to ambient light levels are best served by the the <code>light-level</code> CSS media feature <a data-link-type="biblio" href="#biblio-mediaqueries-5">[MEDIAQUERIES-5]</a> and its accompanying <code>matchMedia</code> API <a data-link-type="biblio" href="#biblio-cssom">[CSSOM]</a> and are out of scope of this API.</p>
1546-
<p class="note" role="note"><span>Note:</span> it might be worthwhile to provide a <a data-link-type="dfn" href="https://w3c.github.io/sensors#high-level" id="ref-for-high-level">high-level</a> Light Level Sensor
1546+
<p class="note" role="note"><span>Note:</span> it might be worthwhile to provide a <a data-link-type="dfn" href="https://w3c.github.io/sensors/#high-level" id="ref-for-high-level">high-level</a> Light Level Sensor
15471547
which would mirror the <code>light-level</code> media feature, but in JavaScript.
15481548
This sensor would <em>not require additional user permission to be activated</em> in user agents that exposed the <code>light-level</code> media feature.</p>
15491549
<h2 class="heading settled" data-level="2" id="examples"><span class="secno">2. </span><span class="content">Examples</span><a class="self-link" href="#examples"></a></h2>
15501550
<div class="example" id="example-67e29d5f">
15511551
<a class="self-link" href="#example-67e29d5f"></a> In this simple example, ambient light sensor is created with
1552-
default configuration. Whenever new <a data-link-type="dfn" href="https://w3c.github.io/sensors#sensor-readings" id="ref-for-sensor-readings">reading</a> is available,
1552+
default configuration. Whenever new <a data-link-type="dfn" href="https://w3c.github.io/sensors/#sensor-reading" id="ref-for-sensor-reading">reading</a> is available,
15531553
it is printed to the console.
15541554
<pre class="highlight"><span class="kr">const</span> sensor <span class="o">=</span> <span class="k">new</span> AmbientLightSensor<span class="p">();</span>
15551555
sensor<span class="p">.</span>onreading <span class="o">=</span> <span class="p">()</span> <span class="p">=></span> console<span class="p">.</span>log<span class="p">(</span>sensor<span class="p">.</span>illuminance<span class="p">);</span>
@@ -1559,8 +1559,8 @@ <h2 class="heading settled" data-level="2" id="examples"><span class="secno">2.
15591559
</div>
15601560
<div class="example" id="example-ae3465bd">
15611561
<a class="self-link" href="#example-ae3465bd"></a> In this example, exposure value (EV) at ISO 100 is calculated from
1562-
the ambient light <a data-link-type="dfn" href="https://w3c.github.io/sensors#sensor-readings" id="ref-for-sensor-readings">sensor readings</a>. Initially, we check that the user
1563-
agent has permissions to access ambient light <a data-link-type="dfn" href="https://w3c.github.io/sensors#sensor-readings" id="ref-for-sensor-readings">sensor readings</a>. Then, <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
1562+
the ambient light <a data-link-type="dfn" href="https://w3c.github.io/sensors/#sensor-reading" id="ref-for-sensor-reading">sensor readings</a>. Initially, we check that the user
1563+
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, <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
15641564
closest exposure value.
15651565
<pre class="highlight">navigator<span class="p">.</span>permissions<span class="p">.</span>query<span class="p">({</span> name<span class="o">:</span> <span class="s1">'ambient-light-sensor'</span> <span class="p">}).</span>then<span class="p">(</span>result <span class="p">=></span> <span class="p">{</span>
15661566
<span class="k">if</span> <span class="p">(</span>result<span class="p">.</span>state <span class="o">===</span> <span class="s1">'denied'</span><span class="p">)</span> <span class="p">{</span>
@@ -1586,7 +1586,7 @@ <h2 class="heading settled" data-level="2" id="examples"><span class="secno">2.
15861586
</pre>
15871587
</div>
15881588
<div class="example" id="example-67979230">
1589-
<a class="self-link" href="#example-67979230"></a> This example demonstrates how ambient light <a data-link-type="dfn" href="https://w3c.github.io/sensors#sensor-readings" id="ref-for-sensor-readings">sensor readings</a> can be mapped
1589+
<a class="self-link" href="#example-67979230"></a> This example demonstrates how ambient light <a data-link-type="dfn" href="https://w3c.github.io/sensors/#sensor-reading" id="ref-for-sensor-reading">sensor readings</a> can be mapped
15901590
to recommended workplace light levels.
15911591
<pre class="highlight"><span class="kr">const</span> als <span class="o">=</span> <span class="k">new</span> AmbientLightSensor<span class="p">();</span>
15921592

@@ -1647,16 +1647,16 @@ <h2 class="heading settled" data-level="3" id="security-and-privacy"><span class
16471647
use one or both of the following mitigation strategies:</p>
16481648
<ul>
16491649
<li data-md="">
1650-
<p><a data-link-type="dfn" href="https://w3c.github.io/sensors#limit-max-frequency" id="ref-for-limit-max-frequency">limit maximum sampling frequency</a></p>
1650+
<p><a data-link-type="dfn" href="https://w3c.github.io/sensors/#limit-max-frequency" id="ref-for-limit-max-frequency">limit maximum sampling frequency</a></p>
16511651
<li data-md="">
1652-
<p><a data-link-type="dfn" href="https://w3c.github.io/sensors#reduce-accuracy" id="ref-for-reduce-accuracy">reduce accuracy</a> of sensor readings</p>
1652+
<p><a data-link-type="dfn" href="https://w3c.github.io/sensors/#reduce-accuracy" id="ref-for-reduce-accuracy">reduce accuracy</a> of sensor readings</p>
16531653
</ul>
1654-
<p>These mitigation strategies complement the <a data-link-type="dfn" href="https://w3c.github.io/sensors#mitigation-strategies" id="ref-for-mitigation-strategies">generic mitigations</a> defined in the Generic Sensor API <a data-link-type="biblio" href="#biblio-generic-sensor">[GENERIC-SENSOR]</a>.</p>
1654+
<p>These mitigation strategies complement the <a data-link-type="dfn" href="https://w3c.github.io/sensors/#mitigation-strategies" id="ref-for-mitigation-strategies">generic mitigations</a> defined in the Generic Sensor API <a data-link-type="biblio" href="#biblio-generic-sensor">[GENERIC-SENSOR]</a>.</p>
16551655
<h2 class="heading settled" data-level="4" id="model"><span class="secno">4. </span><span class="content">Model</span><a class="self-link" href="#model"></a></h2>
1656-
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="ambient-light-sensor">Ambient Light Sensor</dfn> <a data-link-type="dfn" href="https://w3c.github.io/sensors#sensor-type" id="ref-for-sensor-type">sensor type</a>’s associated <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/sensors/#sensor" id="ref-for-sensor">Sensor</a></code> subclass is the <code class="idl"><a data-link-type="idl" href="#ambientlightsensor" id="ref-for-ambientlightsensor">AmbientLightSensor</a></code> class.</p>
1657-
<p>The <a data-link-type="dfn" href="#ambient-light-sensor" id="ref-for-ambient-light-sensor">Ambient Light Sensor</a> has a <a data-link-type="dfn" href="https://w3c.github.io/sensors#default-sensor" id="ref-for-default-sensor">default sensor</a>,
1656+
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="ambient-light-sensor">Ambient Light Sensor</dfn> <a data-link-type="dfn" href="https://w3c.github.io/sensors/#sensor-type" id="ref-for-sensor-type">sensor type</a>’s associated <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/sensors/#sensor" id="ref-for-sensor">Sensor</a></code> subclass is the <code class="idl"><a data-link-type="idl" href="#ambientlightsensor" id="ref-for-ambientlightsensor">AmbientLightSensor</a></code> class.</p>
1657+
<p>The <a data-link-type="dfn" href="#ambient-light-sensor" id="ref-for-ambient-light-sensor">Ambient Light Sensor</a> has a <a data-link-type="dfn" href="https://w3c.github.io/sensors/#default-sensor" id="ref-for-default-sensor">default sensor</a>,
16581658
which is the device’s main light detector.</p>
1659-
<p>The <a data-link-type="dfn" href="#ambient-light-sensor" id="ref-for-ambient-light-sensor①">Ambient Light Sensor</a> has an associated <a data-link-type="dfn" href="https://w3c.github.io/sensors#sensor-permission-names" id="ref-for-sensor-permission-names">sensor permission name</a> which is <a class="idl-code" data-link-type="enum-value" href="https://w3c.github.io/permissions/#dom-permissionname-ambient-light-sensor" id="ref-for-dom-permissionname-ambient-light-sensor">"ambient-light-sensor"</a>.</p>
1659+
<p>The <a data-link-type="dfn" href="#ambient-light-sensor" id="ref-for-ambient-light-sensor①">Ambient Light Sensor</a> has an associated <a data-link-type="dfn" href="https://w3c.github.io/sensors/#sensor-permission-names" id="ref-for-sensor-permission-names">sensor permission name</a> which is <a class="idl-code" data-link-type="enum-value" href="https://w3c.github.io/permissions/#dom-permissionname-ambient-light-sensor" id="ref-for-dom-permissionname-ambient-light-sensor">"ambient-light-sensor"</a>.</p>
16601660
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="current-light-level">current light level</dfn> or <dfn data-dfn-type="dfn" data-noexport="" id="illuminance">illuminance<a class="self-link" href="#illuminance"></a></dfn> is a value that represents the ambient light level
16611661
around the hosting device. Its unit is the lux (lx) <a data-link-type="biblio" href="#biblio-si">[SI]</a>.</p>
16621662
<p class="note" role="note"><span>Note:</span> The precise lux value reported by
@@ -1685,7 +1685,7 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="dfn" data-export="" data-
16851685
</dl>
16861686
<ol>
16871687
<li data-md="">
1688-
<p>Let <var>allowed</var> be the result of invoking <a data-link-type="dfn" href="https://w3c.github.io/sensors#check-sensor-policy-controlled-features" id="ref-for-check-sensor-policy-controlled-features">check sensor policy-controlled features</a> with <code class="idl"><a data-link-type="idl" href="#ambientlightsensor" id="ref-for-ambientlightsensor④">AmbientLightSensor</a></code>.</p>
1688+
<p>Let <var>allowed</var> be the result of invoking <a data-link-type="dfn" href="https://w3c.github.io/sensors/#check-sensor-policy-controlled-features" id="ref-for-check-sensor-policy-controlled-features">check sensor policy-controlled features</a> with <code class="idl"><a data-link-type="idl" href="#ambientlightsensor" id="ref-for-ambientlightsensor④">AmbientLightSensor</a></code>.</p>
16891689
<li data-md="">
16901690
<p>If <var>allowed</var> is false, then:</p>
16911691
<ol>
@@ -1695,7 +1695,7 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="dfn" data-export="" data-
16951695
<li data-md="">
16961696
<p>Let <var>ambient_light_sensor</var> be the new <code class="idl"><a data-link-type="idl" href="#ambientlightsensor" id="ref-for-ambientlightsensor⑤">AmbientLightSensor</a></code> object.</p>
16971697
<li data-md="">
1698-
<p>Invoke <a data-link-type="dfn" href="https://w3c.github.io/sensors#initialize-a-sensor-object" id="ref-for-initialize-a-sensor-object">initialize a sensor object</a> with <var>ambient_light_sensor</var> and <var>options</var>.</p>
1698+
<p>Invoke <a data-link-type="dfn" href="https://w3c.github.io/sensors/#initialize-a-sensor-object" id="ref-for-initialize-a-sensor-object">initialize a sensor object</a> with <var>ambient_light_sensor</var> and <var>options</var>.</p>
16991699
<li data-md="">
17001700
<p>Return <var>ambient_light_sensor</var>.</p>
17011701
</ol>
@@ -1714,7 +1714,7 @@ <h2 class="heading settled" data-level="7" id="usecases-requirements"><span clas
17141714
</ul>
17151715
<p>While some of the use cases may benefit from obtaining precise ambient light measurements, the use
17161716
cases that convert ambient light level fluctuations to user input events, would benefit from
1717-
higher <a data-link-type="dfn" href="https://w3c.github.io/sensors#sampling-frequency" id="ref-for-sampling-frequency">sampling frequencies</a>.</p>
1717+
higher <a data-link-type="dfn" href="https://w3c.github.io/sensors/#sampling-frequency" id="ref-for-sampling-frequency">sampling frequencies</a>.</p>
17181718
<h2 class="heading settled" data-level="8" id="acknowledgements"><span class="secno">8. </span><span class="content">Acknowledgements</span><a class="self-link" href="#acknowledgements"></a></h2>
17191719
<p>Doug Turner for the initial prototype and
17201720
Marcos Caceres for the test suite.</p>
@@ -1761,18 +1761,18 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
17611761
<ul>
17621762
<li><a href="https://w3c.github.io/sensors/#sensor">Sensor</a>
17631763
<li><a href="https://w3c.github.io/sensors/#dictdef-sensoroptions">SensorOptions</a>
1764-
<li><a href="https://w3c.github.io/sensors#check-sensor-policy-controlled-features">check sensor policy-controlled features</a>
1765-
<li><a href="https://w3c.github.io/sensors#default-sensor">default sensor</a>
1764+
<li><a href="https://w3c.github.io/sensors/#check-sensor-policy-controlled-features">check sensor policy-controlled features</a>
1765+
<li><a href="https://w3c.github.io/sensors/#default-sensor">default sensor</a>
17661766
<li><a href="https://w3c.github.io/sensors/#get-value-from-latest-reading">get value from latest reading</a>
1767-
<li><a href="https://w3c.github.io/sensors#high-level">high-level</a>
1768-
<li><a href="https://w3c.github.io/sensors#initialize-a-sensor-object">initialize a sensor object</a>
1769-
<li><a href="https://w3c.github.io/sensors#limit-max-frequency">limit maximum sampling frequency</a>
1770-
<li><a href="https://w3c.github.io/sensors#mitigation-strategies">mitigation strategies</a>
1771-
<li><a href="https://w3c.github.io/sensors#reduce-accuracy">reduce accuracy</a>
1772-
<li><a href="https://w3c.github.io/sensors#sampling-frequency">sampling frequency</a>
1773-
<li><a href="https://w3c.github.io/sensors#sensor-permission-names">sensor permission name</a>
1774-
<li><a href="https://w3c.github.io/sensors#sensor-readings">sensor readings</a>
1775-
<li><a href="https://w3c.github.io/sensors#sensor-type">sensor type</a>
1767+
<li><a href="https://w3c.github.io/sensors/#high-level">high-level</a>
1768+
<li><a href="https://w3c.github.io/sensors/#initialize-a-sensor-object">initialize a sensor object</a>
1769+
<li><a href="https://w3c.github.io/sensors/#limit-max-frequency">limit maximum sampling frequency</a>
1770+
<li><a href="https://w3c.github.io/sensors/#mitigation-strategies">mitigation strategies</a>
1771+
<li><a href="https://w3c.github.io/sensors/#reduce-accuracy">reduce accuracy</a>
1772+
<li><a href="https://w3c.github.io/sensors/#sampling-frequency">sampling frequency</a>
1773+
<li><a href="https://w3c.github.io/sensors/#sensor-permission-names">sensor permission name</a>
1774+
<li><a href="https://w3c.github.io/sensors/#sensor-reading">sensor reading</a>
1775+
<li><a href="https://w3c.github.io/sensors/#sensor-type">sensor type</a>
17761776
</ul>
17771777
<li>
17781778
<a data-link-type="biblio">[permissions]</a> defines the following terms:

0 commit comments

Comments
 (0)