Opened 12 years ago
Closed 12 years ago
#7556 closed enhancement (duplicate)
dojo.require - allow array for moduleName
Reported by: | Les | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | 2.0 |
Component: | Core | Version: | 1.1.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I frequently need to call dojo.require sequentially. Would it be possible to alternately pass an array of modules as the first argument to dojo.require?
Change History (5)
comment:1 follow-up: 2 Changed 12 years ago by
Owner: | changed from anonymous to James Burke |
---|
comment:2 Changed 12 years ago by
Replying to dante:
something like:
dojo.forEach(["dijit.form.Button","dijit.Dialog"], dojo.require);seems too easy to do out of the box already?
Yes, this will work for me. Thx.
comment:3 Changed 12 years ago by
Milestone: | tbd → 2.0 |
---|
Note that using dojo.forEach will make it hard for the build system to find your dependencies if you want to do custom builds: the build system uses simple regexps to find dojo.require dependencies.
I can see where this could be useful, but I think more appropriate to consider for Dojo 2.0 when we can consider changing APIs.
comment:5 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Les, thanks for the reminder that this ticket predates the other one. I am going to use the other ticket though to track the change.
something like:
seems too easy to do out of the box already?