diff options
author | Valerio Virgillito | 2012-05-16 15:23:48 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-16 15:23:48 -0700 |
commit | 13ae16997d4bbca14e255d5989d1c44a76eac72c (patch) | |
tree | d9ebb1dcc6bebee4cb910b950ecb67c1a2d593cd /node_modules/montage/core/shim/object.js | |
parent | 99f16ae08fbb0a6dfe6008c9833f2253b18c19e5 (diff) | |
download | ninja-13ae16997d4bbca14e255d5989d1c44a76eac72c.tar.gz |
montage v.0.10 integration
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
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 | |||