brentonashworth/one — pull request #79 by bobby (2012-01-20 05:20:58+00:00)
Title: Remote simplification

Hi Brenton,

I was having some issues with one.browser.remote. First of all, the version of GClosure the ClojureScript uses considers some success cases, such as a 201, as an error, which was getting annoying to work around. Second, there was too much complexity around the event handlers on the XhrManager instance. In certain cases, such as when following a redirect, both the on-success and on-error callbacks were fired for a single event.

This commit resolves those issues by using the callback in the .send method of the XhrManager. We dispatch success and error locally, and we don't have to register handlers or dispatch on request id anymore. Overall it this implementation is much simpler and more correct. Sorry for lending you a silly implementation in the first place!

Bobby