Re: skeleton Geolocation API

>> So how about having both callbacks required?
>
> I still feel that onFailure should be optional. It is a meaningful
> operation to call this API and not handle errors, and we shouldn't try
> and babysit. There is also no real downside to making the parameter
> optional.
>

Ok, I was going to say that the downside is one of aesthetic nature:
IMHO, both proposals for making the errorCallback optional suffer in
this respect. However, I took another look at HTML 5 and it does allow
developers to specify null for callback parameters that they are not
interested in (e.g. in the Database API). Given this precedent, I've
decided to go with the following solution:

void getCurrentPosition(successCallback, optional errorCallback,
optional positionOptions);
int watchPosition(successCallback, optional errorCallback, optional
positionOptions);

I will update the spec accordingly. I think we need to move on :)

Thanks,
Andrei

Received on Friday, 25 July 2008 18:28:37 UTC