RE: skeleton Geolocation API

Hi everyone.

This is a little bit of a different issue and may add color to the
discussion regarding optional vs. required: what are all the possible
errors we are considering?

Would timeouts be part of it?

Thanks.

Chris 

-----Original Message-----
From: public-geolocation-request@w3.org
[mailto:public-geolocation-request@w3.org] On Behalf Of Andrei Popescu
Sent: Monday, July 28, 2008 9:22 AM
To: Shyam Habarakada
Cc: Doug Turner; Chris Prince; Alec Berntson; Aaron Boodman;
public-geolocation@w3c.org
Subject: Re: skeleton Geolocation API


Hi,

On Mon, Jul 28, 2008 at 5:16 PM, Shyam Habarakada <shyamh@microsoft.com>
wrote:
> Any other feedback on this topic? It would be great to drive the topic
on the signature of get/watch functions to closure.
>
> Andrei,
> The group has had a lot of good discussion on if errorCallback should
or should not be optional. And most people who commented also indicated
that they could go either way on that ...
>
> Current proposal is,
>
>    void getPosition(successCallback, errorCallback [,
positionOptions]);
>    int watchPosition(successCallback, errorCallback [,
positionOptions]);
>
> where,
>    successCallback is required and must be non-null (else the method
will throw at runtime).
>    errorCallback // OPEN ISSUE on whether this is optional or
required.
>    positionOptions is optional and may be null.

Yes, I followed the discussion:

- Aaron made a good case for why errorCallback should be optional.
- There are precedents in HTML 5 where a developer can pass null for a
callback she isn't interested in.

As I said on Friday, I think we should make errorCallback optional. If
someone wants to pass a PositionOption param but not handle errors,
they can just pass null for the second parameter. I'll update the spec
and ping the list later today.

Thanks,
Andrei

Received on Monday, 28 July 2008 17:10:31 UTC