- From: Cameron McCormack <cam@mcc.id.au>
- Date: Fri, 19 Jun 2009 15:14:52 +1000
- To: Marcin Hanclik <Marcin.Hanclik@access-company.com>
- Cc: public-geolocation <public-geolocation@w3.org>
Marcin Hanclik:
> So is my understanding correct that the following is the interface
> specification that would work in the use case we consider?
>
> [Callback]
> interface PositionOptions {
> attribute boolean enableHighAccuracy;
> attribute long timeout;
> attribute long maximumAge;
> };
Yes.
> Documentation in Web IDL spec will definitely help.
While I’m trying to include an example for each feature of Web IDL, I
agree it would be useful to have some task-focussed examples such as
this one (i.e., “I want to have a named-argument like mechanism in
ECMAScript”).
PositionCallback and PositionErrorCallback both need [Callback] on them
too. If you don’t mind if both
getCurrentPosition(function(p) { … }, …)
and
getCurrentPosition({ handleEvent: function(p) { … } }, …)
work, then you can leave it as is. If you want only the former, use
[Callback=FunctionOnly], and for the latter, [Callback=PropertyOnly].
I think the default is fine.
Also, the “int” type used as the clearWatch() argument type should be
“long”.
--
Cameron McCormack ≝ http://mcc.id.au/
Received on Friday, 19 June 2009 05:15:38 UTC