This commit is contained in:
nightwing 2013-11-20 18:33:40 +04:00
commit 727c94c90a

View file

@ -31,19 +31,9 @@
define(function(require, exports, module) { define(function(require, exports, module) {
"use strict"; "use strict";
exports.inherits = (function() { exports.inherits = function(ctor, superCtor) {
var createObject = Object.create || function(prototype, properties) {
var Type = function () {};
Type.prototype = prototype;
object = new Type();
object.__proto__ = prototype;
if (typeof properties !== 'undefined' && Object.defineProperties) {
Object.defineProperties(object, properties);
}
};
return function(ctor, superCtor) {
ctor.super_ = superCtor; ctor.super_ = superCtor;
ctor.prototype = createObject(superCtor.prototype, { ctor.prototype = Object.create(superCtor.prototype, {
constructor: { constructor: {
value: ctor, value: ctor,
enumerable: false, enumerable: false,
@ -51,8 +41,7 @@ exports.inherits = (function() {
configurable: true configurable: true
} }
}); });
}; };
}());
exports.mixin = function(obj, mixin) { exports.mixin = function(obj, mixin) {
for (var key in mixin) { for (var key in mixin) {