Merge pull request #5529 from michaelletzgus/optimize_js_order
Optimize performance / Load CSS and JS in parallel on firefox
This commit is contained in:
commit
c2ba5e2884
|
@ -96,12 +96,12 @@ function emit_script_tag($src, $script_content='') {
|
||||||
* @param hash $obj all the script information from template
|
* @param hash $obj all the script information from template
|
||||||
*/
|
*/
|
||||||
function emit_script_loading_tags($obj) {
|
function emit_script_loading_tags($obj) {
|
||||||
if (!empty($obj['inline_ocjs'])) {
|
|
||||||
emit_script_tag('', $obj['inline_ocjs']);
|
|
||||||
}
|
|
||||||
foreach($obj['jsfiles'] as $jsfile) {
|
foreach($obj['jsfiles'] as $jsfile) {
|
||||||
emit_script_tag($jsfile, '');
|
emit_script_tag($jsfile, '');
|
||||||
}
|
}
|
||||||
|
if (!empty($obj['inline_ocjs'])) {
|
||||||
|
emit_script_tag('', $obj['inline_ocjs']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue