Skip to content

Commit

Permalink
fix: flaws in web/api/d*
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Mar 3, 2021
1 parent 9244705 commit 6e5d4d8
Show file tree
Hide file tree
Showing 120 changed files with 609 additions and 609 deletions.
4 changes: 2 additions & 2 deletions files/en-us/learn/css/css_layout/grids/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ <h3 id="The_minmax_function">The minmax() function</h3>

<p>Our 100-pixel tall tracks won’t be very useful if we add content into those tracks that is taller than 100 pixels, in which case it would cause an overflow. It might be better to have tracks that are <em>at least</em> 100 pixels tall and can still expand if more content gets into them. A fairly basic fact about the web is that you never really know how tall something is going to be; additional content or larger font sizes can cause problems with designs that attempt to be pixel perfect in every dimension.</p>

<p>The {{cssxref("minmax")}} function lets us set a minimum and maximum size for a track, for example <code>minmax(100px, auto)</code>. The minimum size is 100 pixels, but the maximum is <code>auto</code>, which will expand to fit the content. Try changing <code>grid-auto-rows</code> to use a minmax value:</p>
<p>The {{cssxref("minmax()")}} function lets us set a minimum and maximum size for a track, for example <code>minmax(100px, auto)</code>. The minimum size is 100 pixels, but the maximum is <code>auto</code>, which will expand to fit the content. Try changing <code>grid-auto-rows</code> to use a minmax value:</p>

<pre class="brush: css">.container {
display: grid;
Expand All @@ -309,7 +309,7 @@ <h3 id="The_minmax_function">The minmax() function</h3>

<h3 id="As_many_columns_as_will_fit">As many columns as will fit</h3>

<p>We can combine some of the things we have learned about track listing, repeat notation and {{cssxref("minmax")}} to create a useful pattern. Sometimes it is helpful to be able to ask grid to create as many columns as will fit into the container. We do this by setting the value of <code>grid-template-columns</code> using {{cssxref("repeat")}} notation, but instead of passing in a number, pass in the keyword <code>auto-fill</code>. For the second parameter of the function we use <code>minmax()</code>, with a minimum value equal to the minimum track size that we would like to have, and a maximum of <code>1fr</code>.</p>
<p>We can combine some of the things we have learned about track listing, repeat notation and {{cssxref("minmax()")}} to create a useful pattern. Sometimes it is helpful to be able to ask grid to create as many columns as will fit into the container. We do this by setting the value of <code>grid-template-columns</code> using {{cssxref("repeat()")}} notation, but instead of passing in a number, pass in the keyword <code>auto-fill</code>. For the second parameter of the function we use <code>minmax()</code>, with a minimum value equal to the minimum track size that we would like to have, and a maximum of <code>1fr</code>.</p>

<p>Try this in your file now, using the below CSS:</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li>Related events: <code><a href="/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event">messageerror</a></code>.</li>
<li>Related events: <code><a href="/en-US/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event">messageerror</a></code>.</li>
<li><code><a href="/en-US/docs/Web/API/Worker/postMessage">Worker.postMessage()</a></code>.</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ <h2 id="See_also">See also</h2>

<ul>
<li><code><a href="/en-US/docs/Web/API/Worker/postMessage">Worker.postMessage()</a></code></li>
<li>Related events: <code><a href="/docs/Web/API/DedicatedWorkerGlobalScope/message_event">message</a></code>.</li>
<li>Related events: <code><a href="/en-US/docs/Web/API/DedicatedWorkerGlobalScope/message_event">message</a></code>.</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
---
<p>{{APIRef("Web Workers API")}}</p>

<p>The <code><strong>postMessage()</strong></code> method of the {{domxref("DedicatedWorkerGlobalScope")}} interface sends a message to the main thread that spawned it. This accepts a single parameter, which is the data to send to the worker. The data may be any value or JavaScript object handled by the <a href="/en-US/docs/Web/Guide/DOM/The_structured_clone_algorithm">structured clone</a> algorithm, which includes cyclical references.</p>
<p>The <code><strong>postMessage()</strong></code> method of the {{domxref("DedicatedWorkerGlobalScope")}} interface sends a message to the main thread that spawned it. This accepts a single parameter, which is the data to send to the worker. The data may be any value or JavaScript object handled by the <a href="/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm">structured clone</a> algorithm, which includes cyclical references.</p>

<p>The main scope that spawned the worker can send back information to the thread that spawned it using the {{domxref("Worker.postMessage")}} method.</p>

Expand All @@ -24,7 +24,7 @@ <h3 id="Parameters">Parameters</h3>

<dl>
<dt><em>aMessage</em></dt>
<dd>The object to deliver to the main thread; this will be in the data field in the event delivered to the {{domxref("Worker.onmessage")}} handler. This may be any value or JavaScript object handled by the <a href="/en-US/docs/Web/Guide/DOM/The_structured_clone_algorithm">structured clone</a> algorithm, which includes cyclical references.</dd>
<dd>The object to deliver to the main thread; this will be in the data field in the event delivered to the {{domxref("Worker.onmessage")}} handler. This may be any value or JavaScript object handled by the <a href="/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm">structured clone</a> algorithm, which includes cyclical references.</dd>
<dt><em>transferList</em> {{optional_inline}}</dt>
<dd>An optional <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">array</a> of {{domxref("Transferable")}} objects to transfer ownership of. If the ownership of an object is transferred, it becomes unusable (<em>neutered</em>) in the context it was sent from and it becomes available only to the main thread it was sent to.</dd>
<dd>Only {{domxref("MessagePort")}} and {{domxref("ArrayBuffer")}} objects can be transferred.</dd>
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/delaynode/delaytime/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div>
<p>The <code>delayTime</code> property of the {{ domxref("DelayNode") }} interface is an <a href="/en-US/docs/Web/API/AudioParam#a-rate">a-rate</a> {{domxref("AudioParam")}} representing the amount of delay to apply.</p>

<p><code>delayTime</code> is expressed in seconds, its minimal value is <code>0</code>, and its maximum value is defined by the <code>maxDelayTime</code> argument of the {{domxref("AudioContext.createDelay()")}} method that created it.</p>
<p><code>delayTime</code> is expressed in seconds, its minimal value is <code>0</code>, and its maximum value is defined by the <code>maxDelayTime</code> argument of the {{domxref("BaseAudioContext.createDelay")}} method that created it.</p>
</div>

<h2 id="Syntax">Syntax</h2>
Expand Down Expand Up @@ -60,5 +60,5 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li>
<li><a href="/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li>
</ul>
4 changes: 2 additions & 2 deletions files/en-us/web/api/delaynode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<p><span class="seoSummary">The <strong><code>DelayNode</code></strong> interface represents a <a href="https://en.wikipedia.org/wiki/Digital_delay_line" title="Wikipedia: Digital delay line">delay-line</a>; an {{domxref("AudioNode")}} audio-processing module that causes a delay between the arrival of an input data and its propagation to the output.</span> A <code>DelayNode</code> always has exactly one input and one output, both with the same amount of channels.</p>

<p><img alt="The DelayNode acts as a delay-line, here with a value of 1s." src="https://mdn.mozillademos.org/files/9711/WebAudioDelayNode.png" style="height: 116px; width: 774px;"></p>
<p><img alt="The DelayNode acts as a delay-line, here with a value of 1s." src="webaudiodelaynode.png"></p>

<p>When creating a graph that has a cycle, it is mandatory to have at least one <code>DelayNode</code> in the cycle, or the nodes taking part in the cycle will be muted.</p>

Expand Down Expand Up @@ -90,5 +90,5 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li>
<li><a href="/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li>
</ul>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion files/en-us/web/api/deprecationreportbody/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2 id="Examples">Examples</h2>

<p>Because of the event handler we set up inside the <code>ReportingObserver()</code> constructor, we can now click the button to display the report details.</p>

<p><img alt="image of a jolly bearded man with various stats displayed below it about a deprecated feature" src="https://mdn.mozillademos.org/files/16561/reporting_api_example.png" style="border-style: solid; border-width: 1px; display: block; height: 476px; margin: 0px auto; width: 902px;"></p>
<p><img alt="image of a jolly bearded man with various stats displayed below it about a deprecated feature" src="reporting_api_example.png" style="border-style: solid; border-width: 1px; display: block; margin: 0px auto;"></p>

<p>The report details are displayed via the <code>displayReports()</code> fuction, which takes the observer callback's <code>reports</code> parameter as its parameter:</p>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions files/en-us/web/api/detecting_device_orientation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h2 id="Processing_orientation_events">Processing orientation events</h2>

<h3 id="Orientation_values_explained">Orientation values explained</h3>

<p>The value reported for each axis indicates the amount of rotation around a given axis in reference to a standard coordinate frame. These are described in greater detail in the <a href="/en-US/docs/DOM/Orientation_and_motion_data_explained">Orientation and motion data explained</a> article which is summarized below.</p>
<p>The value reported for each axis indicates the amount of rotation around a given axis in reference to a standard coordinate frame. These are described in greater detail in the <a href="/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained">Orientation and motion data explained</a> article which is summarized below.</p>

<ul>
<li>The {{domxref("DeviceOrientationEvent.alpha")}} value represents the motion of the device around the z axis, represented in degrees with values ranging from 0 (inclusive) to 360 (exclusive).</li>
Expand Down Expand Up @@ -154,7 +154,7 @@ <h2 id="Processing_motion_events">Processing motion events</h2>

<h3 id="Motion_values_explained">Motion values explained</h3>

<p>The {{domxref("DeviceMotionEvent")}} objects provide web developers with information about the speed of changes for the device's position and orientation. The changes are provided along three axis (see <a href="/en-US/docs/Web/Guide/DOM/Events/Orientation_and_motion_data_explained">Orientation and motion data explained</a> for details).</p>
<p>The {{domxref("DeviceMotionEvent")}} objects provide web developers with information about the speed of changes for the device's position and orientation. The changes are provided along three axis (see <a href="/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained">Orientation and motion data explained</a> for details).</p>

<p>For {{domxref("DeviceMotionEvent.acceleration","acceleration")}} and {{domxref("DeviceMotionEvent.accelerationIncludingGravity","accelerationIncludingGravity")}}, those axes correspond to the following:</p>

Expand Down Expand Up @@ -211,7 +211,7 @@ <h2 id="See_also">See also</h2>
<li>{{domxref("DeviceOrientationEvent")}}</li>
<li>{{domxref("DeviceMotionEvent")}}</li>
<li>The legacy <code><a href="/en-US/docs/Web/Events/MozOrientation">MozOrientation</a></code> event.</li>
<li><a href="/en-US/docs/Web/Guide/DOM/Events/Orientation_and_motion_data_explained">Orientation and motion data explained</a></li>
<li><a href="/en-US/docs/Web/Guide/DOM/Events/Using_device_orientation_with_3D_transforms">Using deviceorientation in 3D Transforms</a></li>
<li><a href="/en-US/docs/Games/Workflows/HTML5_Gamedev_Phaser_Device_Orientation">Cyber Orb: 2D maze game with device orientation</a></li>
<li><a href="/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained">Orientation and motion data explained</a></li>
<li><a href="/en-US/docs/Web/Guide/Events/Using_device_orientation_with_3D_transforms">Using deviceorientation in 3D Transforms</a></li>
<li><a href="/en-US/docs/Games/Tutorials/HTML5_Gamedev_Phaser_Device_Orientation">Cyber Orb: 2D maze game with device orientation</a></li>
</ul>
2 changes: 1 addition & 1 deletion files/en-us/web/api/devicelightevent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ <h2 id="See_also">See also</h2>

<ul>
<li>{{event("devicelight")}}</li>
<li><a href="/en-US/docs/WebAPI/Using_Light_Events">Using Light Events</a></li>
<li><a href="/en-US/docs/Web/API/Ambient_Light_Events">Using Light Events</a></li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h2 id="How_Does_it_Work"><span style="line-height: 1.572;">How Does it Work?</s
<p>&gt; 10000 lux : Bright</p>
</div>

<p>It uses the {{DOMxRef("Window.addEventListener", "addEventListener")}} method of the {{DOMxRef("window")}} object.</p>
<p>It uses the {{DOMxRef("EventTarget/addEventListener", "addEventListener")}} method of the {{DOMxRef("window")}} object.</p>

<pre class="brush: js">window.addEventListener("devicelight", function (event) {

Expand Down Expand Up @@ -88,5 +88,5 @@ <h2 id="References">References:</h2>

<ul>
<li><a href="https://hacks.mozilla.org/2013/04/ambient-light-events-and-javascript-detection/">Ambient Light Events and JavaScript detection : Robert Nyman</a></li>
<li><a href="/en-US/docs/WebAPI/Using_Light_Events">Using light events</a></li>
<li><a href="/en-US/docs/Web/API/Ambient_Light_Events">Using light events</a></li>
</ul>
14 changes: 7 additions & 7 deletions files/en-us/web/api/devicelightevent/value/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
title: DeviceLightEvent.value
slug: Web/API/DeviceLightEvent/value
tags:
- API
- Ambient Light Events
- Experimental
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- API
- Ambient Light Events
- Experimental
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
---
<div>{{APIRef("Ambient Light Events")}}</div>

Expand Down Expand Up @@ -50,5 +50,5 @@ <h2 id="See_also">See also</h2>

<ul>
<li>{{domxref("DeviceLightEvent")}}</li>
<li><a href="/en-US/docs/WebAPI/Using_Light_Events">Using Light Events</a></li>
<li><a href="/en-US/docs/Web/API/Ambient_Light_Events">Using Light Events</a></li>
</ul>
22 changes: 11 additions & 11 deletions files/en-us/web/api/devicemotionevent/acceleration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: DeviceMotionEvent.acceleration
slug: Web/API/DeviceMotionEvent/acceleration
tags:
- API
- Device Orientation
- Experimental
- Mobile
- Motion
- NeedsExample
- Orientation
- Property
- Reference
- API
- Device Orientation
- Experimental
- Mobile
- Motion
- NeedsExample
- Orientation
- Property
- Reference
---
<p>{{APIRef("Device Orientation Events")}}</p>

Expand Down Expand Up @@ -75,9 +75,9 @@ <h2 id="See_also">See also</h2>
<li>{{DOMxRef("window.ondevicemotion")}}</li>
<li>{{Event("deviceorientation")}}</li>
<li>{{DOMxRef("DeviceOrientationEvent")}}</li>
<li><a href="/en-US/docs/WebAPI/Detecting_device_orientation">Detecting device
<li><a href="/en-US/docs/Web/API/Detecting_device_orientation">Detecting device
orientation</a></li>
<li><a href="https://developer.mozilla.org/en/DOM/Orientation_and_motion_data_explained"
<li><a href="/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained"
title="Orientation and motion data explained">Orientation and motion data
explained</a></li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: DeviceMotionEvent.accelerationIncludingGravity
slug: Web/API/DeviceMotionEvent/accelerationIncludingGravity
tags:
- API
- Device Orientation
- Experimental
- Mobile
- Motion
- NeedsExample
- Orientation
- Property
- Reference
- API
- Device Orientation
- Experimental
- Mobile
- Motion
- NeedsExample
- Orientation
- Property
- Reference
---
<p>{{APIRef("Device Orientation Events")}}</p>

Expand Down Expand Up @@ -81,9 +81,9 @@ <h2 id="See_also">See also</h2>
<li>{{DOMxRef("window.ondevicemotion")}}</li>
<li>{{Event("deviceorientation")}}</li>
<li>{{DOMxRef("DeviceOrientationEvent")}}</li>
<li><a href="/en-US/docs/WebAPI/Detecting_device_orientation">Detecting device
<li><a href="/en-US/docs/Web/API/Detecting_device_orientation">Detecting device
orientation</a></li>
<li><a href="https://developer.mozilla.org/en/DOM/Orientation_and_motion_data_explained"
<li><a href="/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained"
title="Orientation and motion data explained">Orientation and motion data
explained</a></li>
</ul>
4 changes: 2 additions & 2 deletions files/en-us/web/api/devicemotionevent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ <h2 id="See_also">See also</h2>
<li>{{Event("deviceorientation")}}</li>
<li>{{DOMxRef("DeviceOrientationEvent")}}</li>
<li>{{Event("devicemotion")}}</li>
<li><a href="/en-US/docs/WebAPI/Detecting_device_orientation">Detecting device orientation</a></li>
<li><a href="https://developer.mozilla.org/en/DOM/Orientation_and_motion_data_explained" title="Orientation and motion data explained">Orientation and motion data explained</a></li>
<li><a href="/en-US/docs/Web/API/Detecting_device_orientation">Detecting device orientation</a></li>
<li><a href="/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained" title="Orientation and motion data explained">Orientation and motion data explained</a></li>
</ul>
22 changes: 11 additions & 11 deletions files/en-us/web/api/devicemotionevent/interval/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: DeviceMotionEvent.interval
slug: Web/API/DeviceMotionEvent/interval
tags:
- API
- Device Orientation
- Experimental
- Mobile
- Motion
- NeedsExample
- Orientation
- Property
- Reference
- API
- Device Orientation
- Experimental
- Mobile
- Motion
- NeedsExample
- Orientation
- Property
- Reference
---
<p>{{APIRef("Device Orientation Events")}}</p>

Expand Down Expand Up @@ -53,9 +53,9 @@ <h2 id="See_also">See also</h2>
<li>{{DOMxRef("window.ondevicemotion")}}</li>
<li>{{Event("deviceorientation")}}</li>
<li>{{DOMxRef("DeviceOrientationEvent")}}</li>
<li><a href="/en-US/docs/WebAPI/Detecting_device_orientation">Detecting device
<li><a href="/en-US/docs/Web/API/Detecting_device_orientation">Detecting device
orientation</a></li>
<li><a href="https://developer.mozilla.org/en/DOM/Orientation_and_motion_data_explained"
<li><a href="/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained"
title="Orientation and motion data explained">Orientation and motion data
explained</a></li>
</ul>
26 changes: 13 additions & 13 deletions files/en-us/web/api/devicemotionevent/rotationrate/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
title: DeviceMotionEvent.rotationRate
slug: Web/API/DeviceMotionEvent/rotationRate
tags:
- API
- DOM
- DOM Reference
- Device Orientation
- Experimental
- Mobile
- Motion
- NeedsExample
- Orientation
- Property
- Reference
- API
- DOM
- DOM Reference
- Device Orientation
- Experimental
- Mobile
- Motion
- NeedsExample
- Orientation
- Property
- Reference
---
<p>{{APIRef("Device Orientation Events")}}</p>

Expand Down Expand Up @@ -75,9 +75,9 @@ <h2 id="See_also">See also</h2>
<li>{{DOMxRef("window.ondevicemotion") }}</li>
<li>{{Event("deviceorientation") }}</li>
<li>{{DOMxRef("DeviceOrientationEvent") }}</li>
<li><a href="/en-US/docs/WebAPI/Detecting_device_orientation">Detecting device
<li><a href="/en-US/docs/Web/API/Detecting_device_orientation">Detecting device
orientation</a></li>
<li><a href="https://developer.mozilla.org/en/DOM/Orientation_and_motion_data_explained"
<li><a href="/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained"
title="Orientation and motion data explained">Orientation and motion data
explained</a></li>
</ul>
12 changes: 6 additions & 6 deletions files/en-us/web/api/devicemotioneventacceleration/x/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: 'DeviceMotionEventAcceleration: x'
slug: Web/API/DeviceMotionEventAcceleration/x
tags:
- API
- DeviceAcceleration
- NeedsExample
- Property
- Reference
- API
- DeviceAcceleration
- NeedsExample
- Property
- Reference
---
<div>{{ APIRef("Device Orientation Events") }}</div>

Expand All @@ -27,7 +27,7 @@ <h3 id="Return_Value">Return value</h3>
<dl>
<dt><code>x</code></dt>
<dd>A <code>double</code> indicating the amount of acceleration along the X axis. See <a
href="/en-US/docs/WebAPI/Detecting_device_orientation">Accelerometer values
href="/en-US/docs/Web/API/Detecting_device_orientation">Accelerometer values
explained</a> for details.</dd>
</dl>

Expand Down
Loading

0 comments on commit 6e5d4d8

Please sign in to comment.