1
0
Fork 0
forked from 0x2620/oxjs
This commit is contained in:
j 2012-05-25 16:28:05 +00:00
commit eb9cd1e397
9 changed files with 34 additions and 9 deletions

View file

@ -126,12 +126,14 @@ Ox.loadFile = (function() {
);
element[type == 'css' ? 'href' : 'src'] = file + '?' + Ox.random(1000000);
element.type = type == 'css' ? 'text/css' : 'text/javascript';
if (type == 'css') {
element.rel = 'stylesheet';
}
if (/MSIE/.test(navigator.userAgent)) {
// fixme: find a way to check if css/js have loaded in msie
setTimeout(addFileToCache, 2500);
} else {
if (type == 'css') {
element.rel = 'stylesheet';
waitForCSS();
} else {
element.onload = addFileToCache;