Index: branches/resourceloader/phase3/resources/test/bar.css |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +@CHARSET "UTF-8"; |
| 3 | + |
| 4 | +body { |
| 5 | + background-color: #00AADD; |
| 6 | +} |
\ No newline at end of file |
Property changes on: branches/resourceloader/phase3/resources/test/bar.css |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 7 | + native |
Index: branches/resourceloader/phase3/resources/core/mw.js |
— | — | @@ -428,10 +428,8 @@ |
429 | 429 | function execute( requirement ) { |
430 | 430 | if ( registry[requirement].state === 'loaded' ) { |
431 | 431 | // Add style, if any |
432 | | - if ( typeof registry[requirement].style === 'string' ) { |
433 | | - var style = document.createElement( 'style' ); |
434 | | - style.type = 'text/css'; |
435 | | - style.innerHTML = registry[requirement].style; |
| 432 | + if ( typeof registry[requirement].style === 'string' && registry[requirement].style.length ) { |
| 433 | + $( 'head' ).append( '<style type="text/css">' + registry[requirement].style + '</style>' ); |
436 | 434 | } |
437 | 435 | // Add localizations |
438 | 436 | if ( typeof registry[requirement].localization === 'object' ) { |
— | — | @@ -571,7 +569,8 @@ |
572 | 570 | // Execute right away |
573 | 571 | execute( name ); |
574 | 572 | } else { |
575 | | - // Queue it up and work the queue |
| 573 | + // Queue it up (including the base module!) and work the queue |
| 574 | + requirements[requirements.length] = name; |
576 | 575 | queue[queue.length] = { 'pending': requirements, 'callback': function() { execute( name ); } }; |
577 | 576 | that.work(); |
578 | 577 | } |