summaryrefslogtreecommitdiffstats
path: root/src/civetweb/src/third_party/duktape-1.5.2/polyfills/object-prototype-definegetter.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/civetweb/src/third_party/duktape-1.5.2/polyfills/object-prototype-definegetter.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/civetweb/src/third_party/duktape-1.5.2/polyfills/object-prototype-definegetter.js b/src/civetweb/src/third_party/duktape-1.5.2/polyfills/object-prototype-definegetter.js
new file mode 100644
index 000000000..8d8cabb3d
--- /dev/null
+++ b/src/civetweb/src/third_party/duktape-1.5.2/polyfills/object-prototype-definegetter.js
@@ -0,0 +1,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
+ });
+}