Skip to content

Commit

Permalink
Specify touchId requires unique ids per origin
Browse files Browse the repository at this point in the history
Other small formatting updates
  • Loading branch information
bradleyneedham committed Feb 21, 2023
1 parent 24ff5fe commit 8670954
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,12 @@ <h3>
{{GamepadEffectParameters/weakMagnitude}}, none of which are
required.
</p>
<p>
{{GamepadEffectParameters/startDelay}} and
{{GamepadEffectParameters/duration}} set the duration of the
initial delay before after initiating the effect before the
effect will be started
</p>
<p>
{{GamepadEffectParameters/startDelay}} sets the duration of the
delay after {{GamepadHapticActuator/playEffect()}} is called
Expand Down Expand Up @@ -828,9 +834,14 @@ <h2>
<dfn>touchId</dfn> attribute
</dt>
<dd>
Unique id of the touch event. Range is [0, 4294967295]. The user
agent is responsible for incrementing the touchId for each subsequent
touch event based on information provided by the device API.
Unique id of the touch event. Range is [0, 4294967295].
<p>The user agent is responsible for:</p>
<ul>
<li>Incrementing the id for each subsequent touch event based
on information provided by the device API.</li>
<li>Maintaining the uniqueness of the id per origin to
prevent fingerprinting.</li>
</ul>
{{GamepadTouch/touchId}} SHOULD be set to a default value of 0 when a
new {{Gamepad}} object is created.
</dd>
Expand Down Expand Up @@ -930,7 +941,7 @@ <h2>
<dfn data-dfn-for="Gamepad">[[\touchEvents]]</dfn>
</td>
<td>
<code>null</code>
`null`
</td>
<td>
List of generated touch events.
Expand All @@ -942,22 +953,22 @@ <h2>
<dfn>hand</dfn>
</dt>
<dd>
An enumeration that indicates which hand the controller is being held
in or is most likely to be held in. `"left"`, `"right"`, or `""`.
An enumeration, {{GamepadHand}}, that indicates which hand the controller is being held
in or is most likely to be held in.
</dd>
<dt>
<dfn>hapticActuators</dfn>
</dt>
<dd>
A list of all the haptic actuators in the gamepad. The same object
A list of all the {{GamepadHapticActuator}}s in the gamepad. The same object
MUST be returned until the user agent needs to return different
values (or values in a different order).
</dd>
<dt>
<dfn>pose</dfn>
</dt>
<dd>
The current pose of the gamepad, if supported by the hardware.
The current {{GamepadPose}} of the gamepad, if supported by the hardware.
Includes position, orientation, velocity, and acceleration. If the
hardware cannot supply any pose values, MUST be set to `null`.
</dd>
Expand All @@ -966,7 +977,7 @@ <h2>
</dt>
<dd>
<p>
A list of touch events generated from all touch surfaces. If the
A list of {{GamepadTouch}} events generated from all touch surfaces. If the
device does not support touch events, MUST be set to `null`.
</p>
<p>
Expand All @@ -979,7 +990,6 @@ <h2>
<li>Otherwise return `null`.
</li>
</ol>

</dd>
<dt>
<dfn>vibrationActuator</dfn>
Expand All @@ -988,8 +998,6 @@ <h2>
A {{GamepadHapticActuator}} capable of generating a haptic effect
that vibrates the entire gamepad.
</dd>
</dl>
</dd>
</dl>
<section>
<h3>
Expand All @@ -1010,7 +1018,7 @@ <h3>
"updating touchEvents">update touchEvents</dfn> by running the
following steps:
</p>
<ol>
<ol class="algorithm">
<li>Let |surfaceId:unsigned long| be 0.
</li>
<li>Remove any existing events from
Expand Down

0 comments on commit 8670954

Please sign in to comment.