Re: [w3c/gamepad] Add vibrationActuator to the main spec (PR #190)

@gabrielsanbrito commented on this pull request.



> +            The {{GamepadHapticActuator/playEffect()}} method steps, called with
+            {{GamepadHapticEffectType}} |type:GamepadHapticEffectType| and
+            {{GamepadEffectParameters}} |params:GamepadEffectParameters |, are:
+          </p>
+          <ol class="algorithm">
+            <li>If |params:GamepadEffectParameters| does not describe a [=valid
+            effect=] of type |type:GamepadHapticEffectType|, return [=a promise
+            rejected with=] reason {{TypeError}}.
+            </li>
+            <li>Let |document:Document?| be the [=current settings object=]'s 
+            [=relevant global object=]'s [=associated `Document`=].
+            </li>
+            <li>If |document| is `null` or |document| is not [=Document/fully
+            active=] or |document|'s [=Document/visibility state=] is
+            `"hidden"`, return [=a promise resolved with=]
+            {{GamepadHapticsResult/"preempted"}}.

Will edit to return a promise rejected with an "{{InvalidStateError}}" {{DOMException}}.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/190#discussion_r1452787890
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/pull/190/review/1822323362@github.com>

Received on Monday, 15 January 2024 22:58:06 UTC