Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: flaws in web/api/g* #3046

Merged
merged 1 commit into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/web/api/gainnode/gain/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,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>
16 changes: 8 additions & 8 deletions files/en-us/web/api/gainnode/gainnode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
title: GainNode()
slug: Web/API/GainNode/GainNode
tags:
- API
- Audio
- Constructor
- GainNode
- Media
- Reference
- Web Audio API
- API
- Audio
- Constructor
- GainNode
- Media
- Reference
- Web Audio API
---
<p>{{APIRef("Web Audio API")}}</p>

Expand All @@ -19,7 +19,7 @@

<div class="note">
<p><strong>Note</strong>: You should typically call
{{domxref("AudioContext.createGain()")}} to create a gain node.</p>
{{domxref("BaseAudioContext.createGain")}} to create a gain node.</p>
</div>

<h2 id="Syntax">Syntax</h2>
Expand Down
18 changes: 9 additions & 9 deletions files/en-us/web/api/gamepad/axes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Gamepad.axes
slug: Web/API/Gamepad/axes
tags:
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
---
<p>{{APIRef("Gamepad API")}}</p>

Expand Down Expand Up @@ -77,4 +77,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
18 changes: 9 additions & 9 deletions files/en-us/web/api/gamepad/buttons/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Gamepad.buttons
slug: Web/API/Gamepad/buttons
tags:
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
---
<p>{{APIRef("Gamepad API")}}</p>

Expand Down Expand Up @@ -111,4 +111,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
18 changes: 9 additions & 9 deletions files/en-us/web/api/gamepad/connected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Gamepad.connected
slug: Web/API/Gamepad/connected
tags:
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
---
<p>{{APIRef("Gamepad API")}}</p>

Expand Down Expand Up @@ -58,4 +58,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
18 changes: 9 additions & 9 deletions files/en-us/web/api/gamepad/id/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Gamepad.id
slug: Web/API/Gamepad/id
tags:
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
---
<div>{{APIRef("Gamepad API")}}</div>

Expand Down Expand Up @@ -69,4 +69,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
2 changes: 1 addition & 1 deletion files/en-us/web/api/gamepad/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></li>
<li><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></li>
<li><a href="/en-US/docs/Web/API/Gamepad_API">Gamepad API</a></li>
</ul>
18 changes: 9 additions & 9 deletions files/en-us/web/api/gamepad/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Gamepad.index
slug: Web/API/Gamepad/index
tags:
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
---
<div>{{APIRef("Gamepad API")}}</div>

Expand Down Expand Up @@ -59,4 +59,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
18 changes: 9 additions & 9 deletions files/en-us/web/api/gamepad/mapping/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Gamepad.mapping
slug: Web/API/Gamepad/mapping
tags:
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
---
<p>{{APIRef("Gamepad API")}}</p>

Expand Down Expand Up @@ -59,4 +59,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
18 changes: 9 additions & 9 deletions files/en-us/web/api/gamepad/timestamp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Gamepad.timestamp
slug: Web/API/Gamepad/timestamp
tags:
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
---
<div>{{APIRef("Gamepad API")}}</div>

Expand Down Expand Up @@ -66,4 +66,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
2 changes: 1 addition & 1 deletion files/en-us/web/api/gamepad_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h3 id="Experimental_Gamepad_extensions">Experimental Gamepad extensions</h3>
<dd>Represents the pose of a controller (e.g. position and orientation in 3D space) in the case of a <a href="/en-US/docs/Web/API/WebVR_API">WebVR</a> controller. This is <em>not</em> used by the newer <a href="/en-US/docs/Web/API/WebXR_Device_API">WebXR</a> standard.</dd>
</dl>

<p>See also the <a href="/en-US/docs/Web/API/Gamepad#Experimental_extensions_to_Gamepad">extensions to the Gamepad interface</a>, for features that allow you to access the above information.</p>
<p>See also the <a href="/en-US/docs/Web/API/Gamepad#experimental_extensions_to_gamepad">extensions to the Gamepad interface</a>, for features that allow you to access the above information.</p>

<h3 id="Extensions_to_other_interfaces">Extensions to other interfaces</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h3 id="Using_button_information">Using button information</h3>
cancelRequestAnimationFrame(start);
});</pre>

<p>Chrome does things differently here. Instead of constantly storing the gamepad's latest state in a variable it only stores a snapshot, so to do the same thing in Chrome you have to keep polling it and then only use the {{ domxref("Gamepad") }} object in code when it is available. We have done this below using {{ domxref("Window.setInterval()") }}; once the object is available the gamepad info is outputted, the game loop is started, and the interval is cleared using {{ domxref("Window.clearInterval()") }}. Note that in older versions of Chrome {{ domxref("Navigator.getGamepads()") }} is implemented with a <code>webkit</code> prefix. We attempt to detect and handle both the prefixed version and the standard version of the function for backwards compatibility.</p>
<p>Chrome does things differently here. Instead of constantly storing the gamepad's latest state in a variable it only stores a snapshot, so to do the same thing in Chrome you have to keep polling it and then only use the {{ domxref("Gamepad") }} object in code when it is available. We have done this below using {{ domxref("WindowOrWorkerGlobalScope.setInterval") }}; once the object is available the gamepad info is outputted, the game loop is started, and the interval is cleared using {{ domxref("WindowOrWorkerGlobalScope.clearInterval") }}. Note that in older versions of Chrome {{ domxref("Navigator.getGamepads()") }} is implemented with a <code>webkit</code> prefix. We attempt to detect and handle both the prefixed version and the standard version of the function for backwards compatibility.</p>

<pre class="brush: js">var interval;

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/gamepadbutton/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
18 changes: 9 additions & 9 deletions files/en-us/web/api/gamepadbutton/pressed/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: GamepadButton.pressed
slug: Web/API/GamepadButton/pressed
tags:
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
---
<p>{{APIRef("Gamepad API")}}</p>

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

<ul>
<li><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></li>
<li><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></li>
</ul>
18 changes: 9 additions & 9 deletions files/en-us/web/api/gamepadbutton/value/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: GamepadButton.value
slug: Web/API/GamepadButton/value
tags:
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Games
- NeedsBetterSpecLink
- NeedsMarkupWork
- Property
- Reference
- Référence(2)
---
<p>{{APIRef("Gamepad API")}}</p>

Expand Down Expand Up @@ -62,4 +62,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
12 changes: 6 additions & 6 deletions files/en-us/web/api/gamepadevent/gamepad/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: GamepadEvent.gamepad
slug: Web/API/GamepadEvent/gamepad
tags:
- API
- Gamepad API
- Property
- Reference
- Référence(2)
- API
- Gamepad API
- Property
- Reference
- Référence(2)
---
<div>{{APIRef("Gamepad API")}}</div>

Expand Down Expand Up @@ -58,4 +58,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
2 changes: 1 addition & 1 deletion files/en-us/web/api/gamepadevent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>

<h2 id="See_also">See also</h2>

<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>
<p><a href="/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Using the Gamepad API</a></p>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js">var hasItGotOrientation = gamepadPoseInstance.<code>hasOrientation</code>;</pre>
<pre class="brush: js">var hasItGotOrientation = gamepadPoseInstance.hasOrientation;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/gamepadpose/hasposition/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js">var hasItGotPosition = gamepadPoseInstance.<code>hasPosition</code>;</pre>
<pre class="brush: js">var hasItGotPosition = gamepadPoseInstance.hasPosition;</pre>

<h3 id="Value">Value</h3>

Expand Down
Loading