In ES5, you can get a reference to global object from within strict mode via indirect eval call:
"use strict";
var global = (1,eval)('this');
Take a look at my article; particularly at this section on strict mode.
More Related Contents:
- Can I disable ECMAscript strict mode for specific functions?
- Why is delete not allowed in Javascript5 strict mode?
- Object.defineProperty in ES5?
- Why are Octal numeric literals not allowed in strict mode (and what is the workaround?)
- Find list of strings that matches a pattern that start with a special character « and end with a special character »
- Which is the fastest way to loop? [for curiosity]
- Get array of object’s keys
- Why was the arguments.callee.caller property deprecated in JavaScript?
- how to stop Javascript forEach? [duplicate]
- Why is it Object.defineProperty() rather than this.defineProperty() (for objects)?
- How to get the global object in JavaScript?
- ‘this’ different between REPL and script
- Indirect function call in JavaScript
- What is the difference between ‘let’ and ‘const’ ECMAScript 2015 (ES6)?
- What is the difference between JavaScript and ECMAScript?
- Why are Objects not Iterable in JavaScript?
- JSON left out Infinity and NaN; JSON status in ECMAScript?
- Extending Object.prototype JavaScript
- How to explain object references in ECMAScript terms?
- Why and how does ([![]]+[][[]])[+!+[]+[+[]]] evaluate to the letter “i”? [duplicate]
- Why is ‘event’ available globally in Chrome but not Firefox?
- Javascript IN operator compatibility
- Regex only capturing last instance of capture group in match
- What is the ‘global’ object in NodeJS
- React 18 strict mode causing component to render twice [duplicate]
- Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode
- What Internal Property In ECMAScript is defined for?
- gulp babel, exports is not defined
- Why was ECMAScript 4th edition completely scrapped?
- What’s a valid left-hand-side expression in JavaScript grammar?