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

Re: skeleton Geolocation API

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

>> 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 GMT

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