Does jQuery create a script node in the DOM setting the source equal to the request and then remove the script node?
I was debugging it in firebug and I never noticed an any extra script nodes ever being added. Wondering how jQuery handles this?
E.g.
$(document).ready(
function(){
$.ajax({
url: "...",
type: 'GET',
dataType: 'jsonp'
});
}
);
Take a look at the source of the
jQuery.ajaxTransportfunction in the jQuery source. it returns an object with asendelement containing a function that adds the script to the DOM. This script element has anonloadandonreadystatechange handler that removes itself from the DOM.