2015-04-26 17:33:05 +00:00
|
|
|
/* jshint node: true */
|
|
|
|
|
2014-12-29 19:14:13 +00:00
|
|
|
"use strict";
|
|
|
|
|
2015-09-02 23:53:29 +00:00
|
|
|
require( "jsdom" ).env( "", function( errors, window ) {
|
2014-12-29 19:14:13 +00:00
|
|
|
if ( errors ) {
|
|
|
|
console.error( errors );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var jQuery = require( ".." )( window );
|
|
|
|
|
2015-09-02 23:53:29 +00:00
|
|
|
exports.deferred = function() {
|
2014-12-29 19:14:13 +00:00
|
|
|
var deferred = jQuery.Deferred();
|
|
|
|
|
|
|
|
return {
|
2015-04-26 17:33:05 +00:00
|
|
|
promise: deferred.promise(),
|
2014-12-29 19:14:13 +00:00
|
|
|
resolve: deferred.resolve.bind( deferred ),
|
|
|
|
reject: deferred.reject.bind( deferred )
|
|
|
|
};
|
|
|
|
};
|
2015-04-26 17:33:05 +00:00
|
|
|
} );
|