diff options
author | Jose Antonio Marquez | 2012-05-16 15:42:37 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-16 15:42:37 -0700 |
commit | 857aafee732b6a85fa155ff4a05d1b8fde48f09d (patch) | |
tree | e06d330caee280aa05aec46391979e9abdcf974c /node_modules/montage/core/shim/object.js | |
parent | 5cc5d29736d8bf253e3a168cdd6443e839ffb23c (diff) | |
parent | fd54dabad7cbc27a0efb0957155c00d578912909 (diff) | |
download | ninja-857aafee732b6a85fa155ff4a05d1b8fde48f09d.tar.gz |
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Diffstat (limited to 'node_modules/montage/core/shim/object.js')
-rw-r--r-- | node_modules/montage/core/shim/object.js | 36 |
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 | |||
6 | if (!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 | |||
21 | if (!Object.isSealed) { | ||
22 | Object.defineProperty(Object, "isSealed", { | ||
23 | value: function() { | ||
24 | return false; | ||
25 | } | ||
26 | }); | ||
27 | } | ||
28 | |||
29 | if (!Object.seal) { | ||
30 | Object.defineProperty(Object, "seal", { | ||
31 | value: function(object) { | ||
32 | return object; | ||
33 | } | ||
34 | }); | ||
35 | } | ||
36 | |||