Re: [w3c/gamepad] Add gamepad light indicator extension (#143)

@marcoscaceres commented on this pull request.



> +          </p>
+          
+          <p>
+          For <code>on-off</code> light indicators, one or more non zero values
+          denotes the light indicator is ON, whereas a zero value for all
+          components indicates the light indicator is OFF.
+          </p>
+          
+          <p>
+          For RGB light indicators, one or more non zero values specify the
+          color of the light indicator, whereas all zero values indicate the
+          light indicator is OFF.
+          </p>
+          
+          <p>
+          The returned Promise will resolve <code>true</code> when setting the

Ok, so yeah... it shouldn't resolve with `true` either. 

We probably need to rewrite this whole section. I'd suggest having a look at:
https://w3c.github.io/web-share/#share-method

Basically, we need to do a few checks that can cause the promise to reject... the controller has been disconnected/no longer available, etc. There might be a SecurityError if the permission has been changed before `.setColor()` is called. Also, what should happen if:

```
while (true) {
   x.setColor(randomRGG());
}
```

Rate limit? Drop requests on the floor?  

-- 
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/143#discussion_r586116841

Received on Wednesday, 3 March 2021 05:16:50 UTC