ReSpec fix for better browser compatibility -- fixes "console not defined" problem
--- a/ReSpec.js/js/respec.js Thu Jun 02 18:19:27 2011 +0200
+++ b/ReSpec.js/js/respec.js Thu Jun 02 19:46:32 2011 +0100
@@ -221,7 +221,7 @@
catch (e) {
document.body.style.display = "inherit";
error("Processing error: " + e);
- if (console !== undefined && console.log) console.log(e);
+ window.console && console.log && console.log(e);
}
document.body.style.display = "inherit";
},
@@ -935,7 +935,7 @@
var header;
if (this.specStatus === "finding" || this.specStatus === "draft-finding") header = this.makeTAGHeaders();
else header = this.makeNormalHeaders();
- console.log(header);
+ window.console && console.log && console.log(header);
var tmp = sn.element("div");
tmp.innerHTML = header;
document.body.insertBefore(tmp.firstChild, document.body.firstChild);