- From: Marcos Cáceres <notifications@github.com>
- Date: Mon, 11 Dec 2023 20:24:56 -0800
- To: w3c/gamepad <gamepad@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/gamepad/pull/190/review/1776565029@github.com>
@marcoscaceres commented on this pull request.
> + The {{GamepadHapticActuator/effects}} getter steps are:
+ </p>
+ <ol>
+ <li>Return [=this=].{{GamepadHapticActuator/[[effects]]}}.
+ </li>
+ </ol>
+ </dd>
+ <dt>
+ <dfn>playEffect()</dfn> method
+ </dt>
+ <dd>
+ <p>
+ The {{GamepadHapticActuator/playEffect()}} method steps are:
+ </p>
+ <ol>
+ <li>If |params:GamepadEffectParameters| does not describe a [=valid
I think what we actually want here is a switch statement for performing validation of each `type` and a give `params`. Right now, it's you need to go hunting for what do do, which is not great.
I was expecting:
```HTML
<p>
The {{GamepadHapticActuator/playEffect()}} method steps, called with {{GamepadHapticEffectType}} |type:GamepadHapticEffectType| and {{GamepadEffectParameters}} |params:GamepadEffectParameters | :
</p>
<ol class="algorithm">
<li>Given the value of type |type:GamepadHapticEffectType|, switch on:
<dl class="switch">
<dt>
{{GamepadHapticEffectType/"dual-rumble"}}
</dt>
<dd>
<ol>
<li>let |result be [=validate "dual-rumble" parameters=] passing |params|.
<li>If result is an an error, return [=a promise rejected=] with error.
<ol>
</dd>
</dl>
</li>
<!--- other steps -->
</ol>
```
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/190#pullrequestreview-1776565029
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/gamepad/pull/190/review/1776565029@github.com>
Received on Tuesday, 12 December 2023 04:25:02 UTC