Intent to Ship: touched attribute on GamepadButton

40 views
Skip to first unread message

David Dorwin

unread,
Dec 6, 2018, 5:46:54 PM12/6/18
to blink-dev, baj...@chromium.org

Contact emails

baj...@chromium.org


Explainer

N/A


Spec

https://w3c.github.io/gamepad/#dom-gamepadbutton-touched


This is a single attribute in the existing specification so no separate TAG review has been requested.


Summary

The touched attribute allows developers to detect when a capacitive surface is being touched without being pressed. This is useful for gamepads with touchpads, like the Playstation 4 controller, because it will allow them to differentiate between gestures on the pad and clicks. It was added to the Gamepad spec two years ago but has been behind the GamepadExtensions feature flag since it was added to Blink. We want to enable it by default in Blink and separate it from the non-standard WebVR-specific extensions.


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/IHrxKj4zGjg

Note: This intent also included the pose attribute, which was used for WebVR but is now obsoleted by WebXR.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes, the API is supported on all platforms, but actual Gamepad support varies.


Demo link

There is a pull request to update a demo: https://github.com/luser/gamepadtest/pull/9


Risks

Interoperability and Compatibility

Both Firefox and Edge support this attribute, and this is the only [1] failure for Chrome in the Gamepad IDL harness test.


Edge: Shipped [2]

Firefox: Shipped

Safari: No signals (not implemented)

Web developers: Positive (used by WebVR developers for VR controllers)


Ergonomics

This attribute is implemented in the same way as the existing attributes, so there should be no additional concerns.


Activation

This is an additional state on an existing interface.


Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

As with the rest of the API, this attribute is covered by an IDL test: https://wpt.fyi/results/gamepad/idlharness.window.html


Entry on the feature dashboard

https://www.chromestatus.com/feature/5727206521176064



[1] All browsers fail the GamepadEvent interface object length test (issue).

[2] The current test failure in Edge is caused by a change to the IDL harness. (It had also affected Chrome 70.) https://developer.microsoft.com/en-us/microsoft-edge/platform/catalog/?q=specName%3Agamepad also indicates support.


Daniel Bratell

unread,
Dec 7, 2018, 4:11:25 AM12/7/18
to blink-dev, David Dorwin, baj...@chromium.org
LGTM1

/Daniel
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHD2rsj1quNtdndEGs2wNLt9MwJtF5_NN8c74EfgAdPq2y%3DfSw%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Mike West

unread,
Dec 7, 2018, 7:23:03 AM12/7/18
to Daniel Bratell, blink-dev, ddo...@chromium.org, baj...@chromium.org
Following along with Edge and Firefox's implementations is good for developers and interop. LGTM2.

-mike


Philip Jägenstedt

unread,
Dec 7, 2018, 10:03:44 AM12/7/18
to Mike West, Daniel Bratell, blink-dev, David Dorwin, baj...@chromium.org
Reply all
Reply to author
Forward
0 new messages