aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/core/shim/object.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/montage/core/shim/object.js')
-rw-r--r--node_modules/montage/core/shim/object.js36
1 files changed, 36 insertions, 0 deletions
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 @@
1
2/**
3 @external Object
4 */
5
6if (!Object.create) {
7 Object._creator = function _ObjectCreator() {
8 this.__proto__ = _ObjectCreator.prototype;
9 };
10 Object.create = function(o, properties) {
11 this._creator.prototype = o || Object.prototype;
12 //Still needs to add properties....
13 return new this._creator;
14 };
15
16 Object.getPrototypeOf = function(o) {
17 return o.__proto__;
18 };
19}
20
21if (!Object.isSealed) {
22 Object.defineProperty(Object, "isSealed", {
23 value: function() {
24 return false;
25 }
26 });
27}
28
29if (!Object.seal) {
30 Object.defineProperty(Object, "seal", {
31 value: function(object) {
32 return object;
33 }
34 });
35}
36