Core: Fix the exports setup to make bundlers work with ESM & CommonJS
[jquery.git] / test / data / csp-ajax-script.js
blobc6821a24e544e841ed9e41f5c0d1a03a4871f960
1 /* global startIframeTest */
3 var timeoutId, type;
5 function finalize() {
6         startIframeTest( type, window.downloadedScriptCalled );
9 timeoutId = setTimeout( function() {
10         finalize();
11 }, 1000 );
13 jQuery
14         .ajax( {
15                 url: "csp-ajax-script-downloaded.js",
16                 dataType: "script",
17                 method: "POST",
18                 beforeSend: function( _jqXhr, settings ) {
19                         type = settings.type;
20                 }
21         } )
22         .then( function() {
23                 clearTimeout( timeoutId );
24                 finalize();
25         } );