摘要: //模拟类式继承//Douglas CrockfordFunction.prototype.method = function(name,func) { this.prototype[name] = func; return this;};Function.method('inherits', function(parent) { var depth = 0; var proto = this.prototype = new parent(); this.method('uber', function uber(name)) { var func; ... 阅读全文
posted @ 2013-10-26 15:33 LambdaTea 阅读(149) 评论(0) 推荐(0) 编辑