From 13ae16997d4bbca14e255d5989d1c44a76eac72c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 15:23:48 -0700 Subject: montage v.0.10 integration Signed-off-by: Valerio Virgillito --- node_modules/montage/core/shim/object.js | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 node_modules/montage/core/shim/object.js (limited to 'node_modules/montage/core/shim/object.js') diff --git a/node_modules/montage/core/shim/object.js b/node_modules/montage/core/shim/object.js new file mode 100644 index 00000000..3b4f2351 --- /dev/null +++ b/node_modules/montage/core/shim/object.js @@ -0,0 +1,36 @@ + +/** + @external Object + */ + +if (!Object.create) { + Object._creator = function _ObjectCreator() { + this.__proto__ = _ObjectCreator.prototype; + }; + Object.create = function(o, properties) { + this._creator.prototype = o || Object.prototype; + //Still needs to add properties.... + return new this._creator; + }; + + Object.getPrototypeOf = function(o) { + return o.__proto__; + }; +} + +if (!Object.isSealed) { + Object.defineProperty(Object, "isSealed", { + value: function() { + return false; + } + }); +} + +if (!Object.seal) { + Object.defineProperty(Object, "seal", { + value: function(object) { + return object; + } + }); +} + -- cgit v1.2.3