1
0
Fork 0
forked from 0x2620/oxjs

support opera until failure screen

This commit is contained in:
rolux 2011-04-25 13:08:06 +02:00
commit 735ddc9d4a
3 changed files with 33 additions and 28 deletions

View file

@ -196,15 +196,13 @@ Ox.loadFile = (function() {
callback();
}
function addFileToCache() {
type == 'svg' && Ox.print('addToCache', file)
if (type == 'css' || type == 'js') {
cache['file'] = true;
callback();
} else {
cache['file'] = element;
callback({
width: element.width,
height: element.heigth
});
callback(element);
}
}
function findFileInHead() {
@ -1239,7 +1237,7 @@ Ox.documentReady = (function() {
var callbacks = [];
document.onreadystatechange = function() {
if (document.readyState == 'complete') {
Ox.print('document has become ready', callbacks);
//Ox.print('document has become ready', callbacks);
callbacks.forEach(function(callback) {
callback();
});
@ -1248,11 +1246,11 @@ Ox.documentReady = (function() {
};
return function(callback) {
if (document.readyState == 'complete') {
Ox.print('document is ready')
//Ox.print('document is ready')
callback();
} else {
callbacks.push(callback);
Ox.print('document is not ready', callbacks)
//Ox.print('document is not ready', callbacks)
}
}
}());