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