mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
26 lines
442 B
JavaScript
26 lines
442 B
JavaScript
|
/* global startIframeTest */
|
||
|
|
||
|
var timeoutId, type;
|
||
|
|
||
|
function finalize() {
|
||
|
startIframeTest( type, window.downloadedScriptCalled );
|
||
|
}
|
||
|
|
||
|
timeoutId = setTimeout( function() {
|
||
|
finalize();
|
||
|
}, 1000 );
|
||
|
|
||
|
jQuery
|
||
|
.ajax( {
|
||
|
url: "csp-ajax-script-downloaded.js",
|
||
|
dataType: "script",
|
||
|
method: "POST",
|
||
|
beforeSend: function( _jqXhr, settings ) {
|
||
|
type = settings.type;
|
||
|
}
|
||
|
} )
|
||
|
.then( function() {
|
||
|
clearTimeout( timeoutId );
|
||
|
finalize();
|
||
|
} );
|