W3C home > Mailing lists > Public > public-device-apis@w3.org > October 2013

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

From: Device APIs Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Tue, 22 Oct 2013 16:54:21 +0000
Message-Id: <E1VYfDp-0007TR-12@shauna.w3.org>
To: public-device-apis@w3.org
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:33:01 UTC