debug.js icon indicating copy to clipboard operation
debug.js copied to clipboard

建议修改debug.js的参数和console的参数形式一致。

Open as3long opened this issue 10 years ago • 1 comments

    for (fn in debugMap) {
      Debug.prototype[fn] = (function(fn) {
        return function() {
          var msg;
          if(arguments.length==1){
            msg=arguments[0];
          }else{
            msg=[].slice.apply(arguments);
          }
          this.fn = fn;
          this.msg = render(msg);
          this.color = debugMap[fn];
          return this.print();
        };
      })(fn);
    }

这样就可以使用debug.log(1,2,3,4);

as3long avatar Oct 27 '14 03:10 as3long

@as3long ok,多谢。我研究下console的api再完善下。

binnng avatar Oct 27 '14 07:10 binnng