Re: PositionOptions

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