forked from 0x2620/oxjs
IE fixes
This commit is contained in:
parent
d83046460f
commit
eb9cd1e397
9 changed files with 34 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue