Register jQuery as a CommonjS async module
|Reported by:||jrburke||Owned by:||jrburke|
Description (last modified by )
There are a couple browser-based CommonJS-friendly loaders (RequireJS, Yabble) that can load modules that use an async module format.
Ideally jQuery would register itself as a module using this format. This would allow jQuery to participate in browser module loading with these compatible loaders. Right now a patched version of jQuery is needed to accomplish this behavior. This approach also makes it easier for script loaders to use the new jQuery.readyWait feature to indicate other async scripts are loading and to not fire the jQuery ready callbacks until the scripts finish loading.
There is a test for this change here: http://github.com/jrburke/requirejs/blob/master/build/jquery/test.html
and I verified the change works by the jquery-master.js patched jQuery file that is a sibling to test.html. I am happy to reconfirm the change if it is committed to the master repo.
I will attach a pull request link to this ticket that has the code change after I create the ticket so I can put the ticket number in the pull request.
Ticket #5742 can be closed out, superseded by this ticket.
Change History (32)
comment:3 Changed 7 years ago by
|Component:||unfiled → core|
|Milestone:||1.4.3 → 1.5|
|need:||Review → Commit|
|Priority:||undecided → high|
comment:9 Changed 6 years ago by
|Owner:||set to jrburke|
|Status:||open → assigned|
|Version:||1.4.2 → 1.4.4|