DAP-ISSUE-156: add the [Clamp] attribute to the argument of the vibrate method [Vibration API]

DAP-ISSUE-156: add the [Clamp] attribute to the argument of the vibrate method [Vibration API]

http://www.w3.org/2009/dap/track/issues/156

Raised by: Frederick Hirsch
On product: Vibration API

on behalf of Michael van Ouwerkerk <mvanouwerkerk@chromium.org>

see http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0148.html

[[

Hi, would it make sense to add the [Clamp] attribute to the argument of the vibrate method? This would be added in WebIDL.

See the Clamp attribute here:
http://dev.w3.org/2006/webapi/WebIDL/#Clamp

Without it, navigator.vibrate(-1) becomes navigator.vibrate(4294967295).

It seems clamping it to 0 would be a more elegant way of handling this bad input.

]]

Received on Tuesday, 22 October 2013 16:54:21 UTC