Opened 11 years ago

Closed 10 years ago

#14546 closed enhancement (invalid)

require() to return a Deferred

Reported by: Kitson Kelly Owned by: Rawld Gill
Priority: high Milestone: tbd
Component: Loader Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:


Change the require(), or create an equivalent module loader to return a deferred object, so the following would be possible:

var requireDeferred = require(["package/Something"]);

requireDeferred.then(function(object) {
function(error) {

Change History (3)

comment:1 Changed 11 years ago by Kitson Kelly

As per discussion on dojo-contributors ( I am fine with this enhancement being closed.

comment:2 Changed 10 years ago by bill

Component: CoreLoader
Owner: set to Rawld Gill

I'd say to close it too but assigning to Rawld since it's his code. It would be nice to use Deferreds to be consistent with the rest of dojo, but it seems more important to be consistent with the other AMD loaders.

And on a similar note, even if the loader did have this feature, I wouldn't want to use it in dojo code like the parser because it would prevent the parser from working with other AMD loaders.

comment:3 Changed 10 years ago by Rawld Gill

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.