Right now in 1.2.1 the JSONP method uses an asynchronous call to do it's
thing.
This sometimes causes a problem when we are sending a call about a "click"
event on a link.  The page unloads before the JSONP is finished.

Changing it to be optional (async or synchronous) helps fix that problem.

Code we used inside jQuery (with a param call to .ajax)

/* If the request is not async, we need to wait for the script to load
before returning. */
else if (!s.async) {
  var done = false;
  // Attach handlers for all browsers
    script.onload = script.onreadystatechange = function(){
      if ( !done && (!this.readyState ||
        this.readyState == "loaded" || this.readyState == "complete") ) {
      }
    };
  }

QUESTION:  Putting this directly into our copy of jQuery is probably a bad
idea.  *How can this be turned into a plugin?*

Thanks much,

Glen

Reply via email to