Re: Storage Quota API

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