mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
395 B
15 lines
395 B
/*
|
|
* Duktape 2.5.0 adds a 'globalThis' binding. Polyfill for earlier versions.
|
|
*/
|
|
|
|
if (typeof globalThis === 'undefined') {
|
|
(function () {
|
|
var global = new Function('return this;')();
|
|
Object.defineProperty(global, 'globalThis', {
|
|
value: global,
|
|
writable: true,
|
|
enumerable: false,
|
|
configurable: true
|
|
});
|
|
})();
|
|
}
|
|
|