摘要: Prototype’s object for class-based OOP.prototype OOP编程的基础,详细说明一下源码:view plaincopy to clipboardprint?/* Based on Alex Arnell's inheritance implementation. */ var Class = (function() { //临时存储paren... 阅读全文
posted @ 2009-07-29 16:46 麦飞 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 这个对象就是对function的一些扩充,最重要的当属bind方法,prototype的帮助文档上特意说了一句话:Prototype takes issue with only one aspect of functions: binding.其中wrap方法也很重要,在类继承机制里面就是利用wrap方法来调用父类的同名方法。 argumentNames bind bindAsEventList... 阅读全文
posted @ 2009-07-29 16:00 麦飞 阅读(595) 评论(0) 推荐(0) 编辑