코드 사본은 다음과 같습니다.
if (! window.console) {
var names = [ "log", "debug", "info", "warn", "error", "asser", "dir", "dirxml", "GroupEnd", "time", "timeend", "timeend" ","count ","trace ","profile ","profileend "];
window.console = {};
for (var i = 0; i <names.length; i ++) {
window.console [names [i]] = function () {};
}
}
물론 기본 라이브러리에 배치 할 수 있습니다.