W3C home > Mailing lists > Public > public-geolocation@w3.org > July 2008

Re: skeleton Geolocation API

From: Andrei Popescu <andreip@google.com>
Date: Mon, 28 Jul 2008 17:21:32 +0100
Message-ID: <708552fb0807280921m495fd9d5h89fb3311c0877239@mail.gmail.com>
To: "Shyam Habarakada" <shyamh@microsoft.com>
Cc: "Doug Turner" <doug.turner@gmail.com>, "Chris Prince" <cprince@google.com>, "Alec Berntson" <alecb@windows.microsoft.com>, "Aaron Boodman" <aa@google.com>, "public-geolocation@w3c.org" <public-geolocation@w3c.org>

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 16:22:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 March 2012 18:13:39 GMT