Last modified: 2014-07-12 10:18:52 UTC
Example: ve.ce.MWBlockImageNode mixes in ve.ce.MWResizableNode which inherits from ve.ce.ResizableNode, however the methods from ve.ce.ResizableNode are not mixed in automatically if you just mix in ve.ce.MWResizableNode.
This is by design. Mixing in a class only copies over own properties. Not inherited properties. JavaScript can't have an object inherit from multiple parents. We have the convention to not alter mixins once defined. So copying over one is fine. But the parent of a mixin, I'm not so sure (and we'd have to distinguish it from any prototypes in the chain we don't want to copy manually, such as Function prototype and Object prototype). If the "sub mixin" doesn't care about live inheritance (and it can't care, because mixins can't be live since they always copy over), then the sub mixin should just use 'mixin' for its 'parent' not 'inherit'.