3 ms·
Would anyone mind annotating jashkenas' version of this? For someone like me who isn't yet an advanced Javascript user, I feel this could be a terrific, concise
by rattray 13y ago
Would anyone mind annotating jashkenas' version of this? For someone like me who isn't yet an advanced Javascript user, I feel this could be a terrific, concise learning opportunity, and while I understand more or less what is going on, I have next to no idea as to the why.
- jashkenas 13y agoYou're in luck. I boiled it down from the slightly more comprehensive version that Backbone uses, annotated here: http://backbonejs.org/docs/backbone.html#section-206 http://backbonejs.org/docs/backbone.html#section-206 The main difference being that the Backbone version is also copying "static" properties -- properties defined directly on the parent constructor function -- down into the subclass.
- rattray 13y agoThanks very much for the pointer!