This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backbone.mixin = function (obj, mixin) { | |
var source = obj.prototype || obj; | |
if (!mixin) | |
throw new Error('Backbone.mixin: The mixin specified is undefined.'); | |
// merge all properties in the mixin into the view's prototype | |
_.defaults(source, mixin); | |
// merge object literal properties (ensure's events, bindings, and channels) |