W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Storage Quota API

From: Robin Berjon <robin@berjon.com>
Date: Tue, 27 Sep 2011 12:06:08 +0200
Cc: Charles Pritchard <chuck@jumis.com>, public-webapps <public-webapps@w3.org>
Message-Id: <FF4A6138-15EF-49E9-8875-3C162590F661@berjon.com>
To: Jonas Sicking <jonas@sicking.cc>
On Sep 27, 2011, at 01:43 , Jonas Sicking wrote:
> Please don't use errorCallback/SuccessCallback. That's not used in any
> other APIs that are part of the cross-browser web platform. Instead
> return a request object on which events are fired.

Except for, you know, Geolocation. I don't know that we should make a religion out of this. Returning a request object might be good when you could attach a bunch of different handlers to it (e.g. progress events) but for the simple error/success case it seems unnecessarily verbose. I'm not sure we should monkey XHR which pioneered this style, it never felt JavaScriptish and all the libraries that I can think of wrap its ugliness away. If I had to pick the style that felt most like JS, I'd go for Node's cb(errOrNull, whateverElse).

Robin Berjon - http://berjon.com/ - @robinberjon
Received on Tuesday, 27 September 2011 10:06:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:24 UTC