Ticket #2532076 (closed enhancement)
ReporterIlya Goberman |
Opened: 03/30/12 Last modified: 08/1/12 Status: closed Type: enhancement Resolution: fixed |
Owner Dav Glass |
Target Release: 3.6.0 Priority: P3 (normal) |
|---|---|---|---|
| Summary: | Combo Loader broken in 3.5.0pr4 | ||
| Description: | YUI combo loader is broken in 3.5.0pr4 and fails to load js files in the correct order. But it does look like these are loaded correctly in the Chrome debugger. This is major show stopper. The test case is below. If you keep pressing F5 in Chrome, you will get 'Uncaught ReferenceError: a is not defined' eventually in Chrome:
<script src="http://yui.yahooapis.com/3.5.0pr4/build/yui/yui-min.js"></script> <script>var getConfig = function () { var config = { modules: { 'a': { fullpath: 'a.js' }, 'b': { fullpath: 'b.js', requires: ['a'] } } return config; YUI(getConfig()).use('b', function (YUI3) {
a = function () {
b = function () { b.prototype = new a(); |
||
| Type: | enhancement | Observed in Version: | 3.5.0pr4 |
| Component: | Loader | Severity: | S3 (normal) |
| Assigned To: | Dav Glass | Target Release: | 3.6.0 |
| Location: | Library Code | Priority: | P3 (normal) |
| Tags: | Relates To: | ||
| Browsers: | All | ||
| URL: | |||
| Test Information: | |||
Change History
|
Posted: 03/30/12
|
|
Posted: 03/30/12
Ref #2532076 - Added documentation to Loader for async loading |
|
Posted: 03/30/12
Ref #2532076 - Added documentation to Loader for async loading |
|
Posted: 04/5/12
|
|
Posted: 04/6/12
|
|
Posted: 04/10/12
Ref #2532076 - Added documentation to Loader for async loading |
|
Posted: 04/12/12
Fixes #2532076 - Added a global async flag to Loader, still defaults to true |
|
Posted: 08/1/12
Shipped in 3.6.0. Marking closed/fixed. |
Jenny Donnelly
Since your modules are not wrapped with a YUI.add, you need to add an `async: false` flag to your modules config:
https://gist.github.com/2252248
I can however add an `async` flag to the YUI config that will force all modules to load in async, but this is not recommended for performance. The `YUI.add` wrapper fixes this by not executing the JS until use time and not load time.