Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function $extend(from, fields) {
- function inherit() {}; inherit.prototype = from; var proto = new inherit();
- for (var name in fields) proto[name] = fields[name];
- return proto;
- }
- var Class = function() {
- /* constructor */
- };
- Class.prototype = $extend(ParentClass, {
- methodName: function(methodArg) {
- /* method contents */
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement