diff --git a/lib/ace/lib/oop.js b/lib/ace/lib/oop.js index 104e8290..85725f0f 100644 --- a/lib/ace/lib/oop.js +++ b/lib/ace/lib/oop.js @@ -31,28 +31,17 @@ define(function(require, exports, module) { "use strict"; -exports.inherits = (function() { - 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); +exports.inherits = function(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true } - }; - return function(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = createObject(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -}()); + }); +}; exports.mixin = function(obj, mixin) { for (var key in mixin) {