cljs-ajax
cljs-ajax copied to clipboard
Deprecate XhrIo
The XmlHttpRequest implementation has been solid for quite some time and the XhrIo code adds very little when you're running in modern browsers. It's time to switch. This will remove all Google Closure code from the main code path for cljs-ajax.
For future reference, if this happens, note that it looks pretty easy to make progress handlers work. GCL just checks for an onprogress property in the xhr object and sets it if its there.
https://github.com/google/closure-library/blob/master/closure/goog/net/xhrio.js#L535
I had been meaning to try out a patch but until I do I wanted to make sure this didn't get lost.
FWIW, I just spent some time tracking down an issue in my program which turned out to be an incompatibility between XhrIo and AdBlock, when loading a page via figwheel. I solved the problem by passing :api (js/XMLHttpRequest.)
to every cljs-ajax call. So you can count me in favor of this change, too!