- From: Marcos Cáceres <notifications@github.com>
- Date: Wed, 28 Oct 2020 18:42:36 -0700
- To: w3c/gamepad <gamepad@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/gamepad/pull/142/review/519263380@github.com>
@marcoscaceres commented on this pull request.
> + <section id='conformance'>
+
+ <h2>Security and privacy considerations</h2>
+
+ <p>User agents MUST implement the <a>GamepadTouch</a> to only be
+ available in <a data-cite= "secure-contexts#secure-context">secure
+ contexts</a>. This provides better protection for the user against
+ man-in-the-middle attacks intended to obtain gamepad data. Browsers may
+ ignore this rule for development purposes only.</p>
+
+ </section>
Don't need this text. Just having the [SecureContext] extended attribute already implies all this and more.
```suggestion
<section id='conformance'></section>
```
> @@ -335,6 +345,57 @@ <h2><dfn>GamepadPose</dfn> Interface</h2>
</dl>
</section>
+ <section>
```suggestion
<section data-dfn-for="GamepadTouch">
```
> + stylus, etc) makes contact with the touch device, up to the time the
+ input medium is no longer making contact with the touch device.
+ </p>
+
+ <pre class="idl">
+ [Exposed=Window, SecureContext]
+ interface GamepadTouch {
+ readonly attribute unsigned long touchId;
+ readonly attribute octet surfaceId;
+ readonly attribute Float32Array position;
+ readonly attribute Uint32Array? surfaceDimensions;
+ };
+ </pre>
+
+ <dl data-dfn-for="GamepadTouch">
+ <dt><dfn>touchId</dfn></dt>
```suggestion
<dt><dfn>touchId</dfn> attribute</dt>
```
It's better to put each attribute into its own `<section>`
> + identifies the touch point from the time the input medium (e.g. finger,
+ stylus, etc) makes contact with the touch device, up to the time the
+ input medium is no longer making contact with the touch device.
+ </p>
+
+ <pre class="idl">
+ [Exposed=Window, SecureContext]
+ interface GamepadTouch {
+ readonly attribute unsigned long touchId;
+ readonly attribute octet surfaceId;
+ readonly attribute Float32Array position;
+ readonly attribute Uint32Array? surfaceDimensions;
+ };
+ </pre>
+
+ <dl data-dfn-for="GamepadTouch">
```suggestion
<dl>
```
> + <pre class="idl">
+ [Exposed=Window, SecureContext]
+ interface GamepadTouch {
+ readonly attribute unsigned long touchId;
+ readonly attribute octet surfaceId;
+ readonly attribute Float32Array position;
+ readonly attribute Uint32Array? surfaceDimensions;
+ };
+ </pre>
+
+ <dl data-dfn-for="GamepadTouch">
+ <dt><dfn>touchId</dfn></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. touchId SHOULD
```suggestion
event based on information provided by the device API. {{GamepadTouch/touchId}} SHOULD
```
> + [Exposed=Window, SecureContext]
+ interface GamepadTouch {
+ readonly attribute unsigned long touchId;
+ readonly attribute octet surfaceId;
+ readonly attribute Float32Array position;
+ readonly attribute Uint32Array? surfaceDimensions;
+ };
+ </pre>
+
+ <dl data-dfn-for="GamepadTouch">
+ <dt><dfn>touchId</dfn></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. touchId SHOULD
+ be set to a default value of 0 when a new Gamepad object is created.
```suggestion
be set to a default value of 0 when a new {{Gamepad}} object is created.
```
> + Unique id of the surface that generated the touch event. Range is
+ [0, 255].
Range is given by octet, so no need to redefine the range.
```suggestion
Unique id of the surface that generated the touch event.
```
> + <h2><dfn>GamepadTouch</dfn> Interface</h2>
+ <p>
+ This interface defines a single touch event on a gamepad device that
+ supports input. The event consists of a touch id that uniquely
+ identifies the touch point from the time the input medium (e.g. finger,
+ stylus, etc) makes contact with the touch device, up to the time the
+ input medium is no longer making contact with the touch device.
+ </p>
+
+ <pre class="idl">
+ [Exposed=Window, SecureContext]
+ interface GamepadTouch {
+ readonly attribute unsigned long touchId;
+ readonly attribute octet surfaceId;
+ readonly attribute Float32Array position;
+ readonly attribute Uint32Array? surfaceDimensions;
Why not just an empty array?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/142#pullrequestreview-519263380
Received on Thursday, 29 October 2020 01:42:50 UTC