4 ], function( jQuery ) {
6 // Install script dataType
9 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
12 script: /(?:java|ecma)script/
15 "text script": function( text ) {
16 jQuery.globalEval( text );
22 // Handle cache's special case and crossDomain
23 jQuery.ajaxPrefilter( "script", function( s ) {
24 if ( s.cache === undefined ) {
27 if ( s.crossDomain ) {
32 // Bind script tag hack transport
33 jQuery.ajaxTransport( "script", function( s ) {
34 // This transport only deals with cross domain requests
35 if ( s.crossDomain ) {
38 send: function( _, complete ) {
39 script = jQuery("<script>").prop({
41 charset: s.scriptCharset,
45 callback = function( evt ) {
49 complete( evt.type === "error" ? 404 : 200, evt.type );
53 document.head.appendChild( script[ 0 ] );