Fail more gracefully on pre-IE9 browsers (still room for improvement though)

This commit is contained in:
Jeff Parsons 2015-04-25 12:54:03 -07:00 committed by jeffpar
commit fcb7c32909
6 changed files with 43 additions and 9 deletions

View file

@ -249,7 +249,7 @@ Component.log = function(s, type)
Component.msStart = usr.getTime();
}
msElapsed = usr.getTime() - Component.msStart;
console.log(msElapsed + "ms: " + sMsg.replace(/\n/g, " "));
if (window && window.console) console.log(msElapsed + "ms: " + sMsg.replace(/\n/g, " "));
}
}
};
@ -658,7 +658,7 @@ Component.prototype = {
}
control.value += s + "\n";
control.scrollTop = control.scrollHeight;
if (DEBUG) console.log(s);
if (DEBUG && window && window.console) console.log(s);
};
}(control));
/**