- From: Robin Berjon <robin@berjon.com>
- Date: Tue, 27 Sep 2011 12:06:08 +0200
- To: Jonas Sicking <jonas@sicking.cc>
- Cc: Charles Pritchard <chuck@jumis.com>, public-webapps <public-webapps@w3.org>
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