W3C home > Mailing lists > Public > public-geolocation@w3.org > February 2014

Inconsistent definition of timeout / maximumAge in Geo v1

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Mon, 03 Feb 2014 17:34:18 +0100
Message-ID: <1391445258.5866.186.camel@cumulustier>
To: public-geolocation@w3.org

While looking at Ms2ger's error reports [1] suggesting to turn
PositionOptions in a dictionary in Geo v1 [2], I discovered the
following inconsistency in the specification:
* the timeout attribute in the PositionOptions interface is defined as
"long", with a default value of Infinity
* the maximumAge attribute of that same interface is also of type
"long", and described in prose as responding to the Infinity value
* yet, the "long" type doesn't accept "Infinity" as a valid value (more
specifically, it casts it to "0")

As far as I can tell, WebIDL doesn't have the notion of infinite integer
values, so I'm not quite sure what the correct way to handle this is.

In XHR, timeout = 0 means no timeout, but at least in Chrome, timeout =
0 triggers immediately the timeout error. (for some reason, my Firefox
is not cooperating with my testing of this)

And the = 0 trick wouldn't do for maximumAge in any case.



2. http://www.w3.org/TR/geolocation-API/
Received on Monday, 3 February 2014 16:34:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:51:07 UTC