Skip to content

Commit 0714c2c

Browse files
cjolifclmath
authored andcommitted
Use jquery promises
1 parent f278f50 commit 0714c2c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

bower.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"version": "0.4.0",
44
"description": "AMD plugins for RequireJS",
55
"dependencies": {
6-
"dojo": ">=1.9.1",
6+
"jquery": ">=2.1",
77
"requirejs": "2.1.x"
88
},
99
"devDependencies": {
10-
"jquery": ">=2.1"
1110
},
1211
"keywords": [
1312
"requirejs",

css.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030

3131
define([
3232
"./has",
33-
"dojo/Deferred",
33+
"./jquery!deferred",
3434
"module"
35-
], function (has, Deferred, module) {
35+
], function (has, $, module) {
3636
"use strict";
3737

3838
has.add("event-link-onload-api", function (global) {
@@ -45,10 +45,11 @@ define([
4545
/**
4646
* Return a promise that resolves when the specified link has finished loading.
4747
* @param {HTMLLinkElement} link - The link element to be notified for.
48-
* @returns {module:dojo/promise/Promise} - A promise.
48+
* @returns {module:jQuery/Promise} - A promise.
49+
* @private
4950
*/
5051
var listenOnLoad = function (link) {
51-
var def = new Deferred(),
52+
var def = new $.Deferred(),
5253
loadHandler = has("event-link-onload-api") ?
5354
function () {
5455
// We're using "readystatechange" because IE happily support both
@@ -71,7 +72,7 @@ define([
7172
};
7273

7374
loadHandler();
74-
return def.promise;
75+
return def.promise();
7576
};
7677

7778
var loadCss = {

0 commit comments

Comments
 (0)