summaryrefslogtreecommitdiffstats
path: root/src/civetweb/src/third_party/duktape-1.5.2/polyfills/object-prototype-definegetter.js
blob: 8d8cabb3dbd00c0a1514816bc079b488d78ef88f (plain)
1
2
3
4
5
6
7
8
9
10
11
/*
 *  Object.prototype.__defineGetter__ polyfill
 */

if (typeof Object.prototype.__defineGetter__ === 'undefined') {
    Object.defineProperty(Object.prototype, '__defineGetter__', {
        value: function (n, f) {
            Object.defineProperty(this, n, { enumerable: true, configurable: true, get: f });
        }, writable: true, enumerable: false, configurable: true
    });
}