Add deadlyicon console fix for safari

This commit is contained in:
ragaskar
2009-10-29 19:48:23 -07:00
parent cf6d26d25f
commit 328cc89980
27 changed files with 1184 additions and 1139 deletions
+1 -11
View File
@@ -116,14 +116,4 @@ jasmine.TrivialReporter.prototype.specFilter = function(spec) {
if (!paramMap["spec"]) return true;
return spec.getFullName().indexOf(paramMap["spec"]) == 0;
};
//protect against console.log incidents
if (!("console" in window) || !("firebug" in console)) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
window.console = {};
for (var i = 0, len = names.length; i < len; ++i) {
window.console[names[i]] = function() {
};
}
}
};
+22
View File
@@ -0,0 +1,22 @@
/** Console X
* http://github.com/deadlyicon/consolex.js
*
* prevents console errors and makes IE console objects true functions
*
*/
(function() {
window.console || (window.console = {});
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
function emptyFunction(){}
for (var i = 0; i < names.length; ++i){
window.console[names[i]] || (window.console[names[i]] = emptyFunction);
if (typeof window.console[names[i]] !== 'function')
window.console[names[i]] = (function(method) {
return function(){ return Function.prototype.apply.apply(method, [console,arguments]); };
})(window.console[names[i]]);
}
})();
+1 -1
View File
@@ -536,7 +536,7 @@ jasmine.version_= {
"major": 0,
"minor": 10,
"build": 0,
"revision": 1256860688
"revision": 1256870877
};
/**
* @namespace