Opened 14 years ago
Closed 14 years ago
#4336 closed enhancement (fixed)
djConfig should allow a list of modules to be auto-required
Reported by: | alex | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Core | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
it should be possible to load modules (particularly in simple pages) like this:
<script type="text/javascript" src="dojo/dojo.js" djConfig="require: ['dijit.dijit', 'dojo.dnd', ...]"> </script>
Or perhaps as:
<script type="text/javascript" src="dojo/dojo.js" djConfig="...", require="dijit.dijit', 'dojo.dnd', ..."> </script>
I don't really know which is better, but some form of attribute-driven auto-require seems intensely preferable to the current situation where most configuration can be handled via djConfig but a separate script block is required to do anything moderately interesting that requires non-Base modules.
For extra credit, the <script> tag that pulls in dojo.js should also support addOnLoad and addOnUnload properties, the values of which are converted to functions and pushed into the load handler stack.
Note: See
TracTickets for help on using
tickets.
(In [10845]) fixes #4336