Skip to content

Add mixins #5

rowanmanning opened this Issue Feb 4, 2013 · 3 comments

2 participants


Allow for mixing in methods from another class after class definition. E.g.

var MyClass = Class.extend({});

// Mix in a set of functions
    foo: function () {},
    bar: function () {}

// Mix in all prototype methods of another class

// Mix in only certain methods of another class
MyClass.mixin(MyOtherClass, ['baz', 'qux']);

I second this. I wonder if it's possible to do it?


Definitely possible, just a bit of a rewrite to the library. I'd probably do this as part of a 2.0 release (not planned at the moment, but maybe soon).


Awesome, looking forward to it! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.