1
0
Fork 0
forked from 0x2620/oxjs

fix Ox.App in Firefox 3.6 to show loading screen, fixes #393

This commit is contained in:
j 2012-02-17 10:24:42 +00:00
commit f919d64044
3 changed files with 9 additions and 6 deletions

View file

@ -68,6 +68,7 @@ Ox.loadFile = (function() {
var cache = {};
return function (file, callback) {
var element,
head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement,
request,
type = file.split('.').pop(),
isImage = type != 'css' && type != 'js';
@ -94,7 +95,7 @@ Ox.loadFile = (function() {
element.onload = addFileToCache;
}
}
document.head.appendChild(element);
head.appendChild(element);
} else {
addFileToCache();
}
@ -135,4 +136,4 @@ Ox.loadFile = (function() {
!error && addFileToCache();
}
};
}());
}());