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

Require system focus for gamepad user gesture #207

Open
wants to merge 4 commits into
base: gh-pages
Choose a base branch
from
Open
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: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ The Gamepad specification defines a low-level interface that represents gamepad
This repository is for editing drafts and discussion of the [Gamepad](https://w3c.github.io/gamepad/) specification
(and [extensions](https://w3c.github.io/gamepad/extensions.html) to it).

See [FeatureRequests.md](FeatureRequests.md) for feature requests beyond the first version of this spec.

This specification is part of the [Web Apps WG](https://github.com/w3c/webappswg).
19 changes: 12 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,13 @@ <h3>
<li>Let |navigator:Navigator| be |gamepad|'s [=relevant global
object=]'s {{Navigator}} object.
</li>
<li>Let |document:Document?| be |gamepad|'s [=relevant global
object=]'s [=associated `Document`=]; otherwise `null`.
</li>
<li>If |navigator|.{{Navigator/[[hasGamepadGesture]]}} is `false` and
|gamepad| [=contains a gamepad user gesture=]:
|document| is a [=Document/fully active descendant of a top-level
traversable with user attention=] and |gamepad| [=contains a gamepad
user gesture=]:
<ol>
<li>Set |navigator|.{{Navigator/[[hasGamepadGesture]]}} to
`true`.
Expand All @@ -527,10 +532,6 @@ <h3>
<li>Set |connectedGamepad|.{{Gamepad/[[timestamp]]}} to
|now|.
</li>
<li>Let |document:Document?| be |gamepad|'s [=relevant
global object=]'s [=associated `Document`=]; otherwise
`null`.
</li>
<li>If |document| is not `null` and is [=Document/fully
active=], then [=queue a task=] on the [=gamepad task
source=] to [=fire an event=] named {{gamepadconnected}}
Expand Down Expand Up @@ -1681,8 +1682,8 @@ <h3>
The {{Navigator/getGamepads()}} method steps are:
</p>
<ol>
<li>Let |doc| be the [=current global object=]'s [=associated
`Document`=].
<li>Let |doc:Document?| be the [=current global object=]'s
[=associated `Document`=].
</li>
<li>If |doc| is `null` or |doc| is not [=Document/fully active=],
then return an empty [=list=].
Expand All @@ -1697,6 +1698,8 @@ <h3>
<li>Let |now:DOMHighResTimeStamp| be the [=current high resolution
time=].
</li>
<li>Let |gamepads:sequence&lt;Gamepad?&gt;| be an empty [=list=].
</li>
<li>[=list/For each=] |gamepad:Gamepad| of
[=this=].{{Navigator/[[gamepads]]}}:
<ol>
Expand All @@ -1709,6 +1712,8 @@ <h3>
</li>
</ol>
</li>
<li>[=list/Append=] |gamepad| to |gamepads|.
</li>
</ol>
</li>
<li>Return |gamepads|.
Expand Down
Loading