Re: [w3c/gamepad] Can duration and startDelay ever be invalid? (Issue #229)

nondebug left a comment (w3c/gamepad#229)

Yes, let's define a maximum total effect duration in the spec or allow the user agent to choose a maximum duration. In the [Chromium implementation](https://crsrc.org/c/third_party/blink/renderer/modules/gamepad/gamepad_haptic_actuator.cc;l=89), the effect duration is computed as `startDelay + duration` and is considered invalid (returns `"invalid-parameter"`) if either parameter is less than zero or the total exceeds 5 seconds.

Currently it's not possible to learn the maximum effect duration through the API, I think it would be better if the maximum duration in millis was available as a readonly member on `GamepadHapticActuator`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/issues/229#issuecomment-4835756105
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/issues/229/4835756105@github.com>

Received on Monday, 29 June 2026 18:33:22 UTC