a custom XHR plugin for the new XHR registry feature

a custom XHR plugin for the new XHR registry feature


I'm excited about the new XHR registry plugin coming out with the next
jQuery release. I have taken a stab at writing a plugin to adapt
jQuery for use with a custom XHR implementation called flXHR (http://
flxhr.flensed.com/), which allows authorized cross-domain
communication.
Here's a link to a working demo: http://flxhr.flensed.com/code/dev-tests/test-jquery-xhr.html
The plugin itself is located here:
http://flxhr.flensed.com/code/build/thirdparty/jquery/jquery.flXHRproxy.js
The strategy I took with this was to create a simple way for an author
to "register" a particular URL for use with this custom flXHR
transport, associating with that target URL a set of custom options
for the transport object to use.
In this way, an author could have multiple different URL's that they
targetted, and each one could have its own set of configuration
options, and the plugin would take care of matching it up at the time
of the request based on matching the target URL.
I was wondering if anyone would be willing to take a look at the
plugin I wrote and offer any advice on if the code is good or
compatible with jQuery, or on what steps it might involve to have this
plugin join the official ranks of jQuery, etc.
Typical usage might be:
jQuery.ajaxSetup({transport:'flXHRproxy'});
jQuery.flXHRproxy.registerOptions('http://www.mydomain.com/',
{xmlResponseText:false...});
jQuery.flXHRproxy.registerOptions('http://rss.mydomain.com/',
{xmlResponseText:true...});
...
jQuery.ajax({url:'http://www.mydomain.com/something.html'...});
...
jQuery.ajax({url:'http://rss.mydomain.com/feed.html'...});