mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
24 lines
448 B
JavaScript
24 lines
448 B
JavaScript
|
/*jshint es3:false, node:true */
|
||
|
"use strict";
|
||
|
|
||
|
require( "jsdom" ).env( "", function ( errors, window ) {
|
||
|
if ( errors ) {
|
||
|
console.error( errors );
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var jQuery = require( ".." )( window );
|
||
|
|
||
|
exports.deferred = function () {
|
||
|
var deferred = jQuery.Deferred();
|
||
|
|
||
|
return {
|
||
|
get promise() {
|
||
|
return deferred.promise();
|
||
|
},
|
||
|
resolve: deferred.resolve.bind( deferred ),
|
||
|
reject: deferred.reject.bind( deferred )
|
||
|
};
|
||
|
};
|
||
|
});
|