title: Getting a reference to the global object in an weird and rare es3-based environment
body: <p>First things first: target/host env is quite rare and weird at same time, so I am OK if this ends with nothing. Pls excuse me in advance for time you might spent on it.</p>
  
  <p>A plot: my friend and I come up with a "plugin" (JS code) for some win32 app to process previously recorded analog signal from injector(s) of you car to analyze it and find (best) approaches for driving your car (max speed (real vs stock), max RPM, max fuel consumption, RPM with best consumption, etc). I wrote it several years ago (based on knowledge/experience I had at that time. Means script was written with help of tech stack ~10y ago). Because of the env I ended with own implementations of logger, profiler, i18n engine, etc.</p>
  
  <p>Platform: its a win32 app (quite old, ~MSWinXP) which is able to process recorded data with plugins. I pretty much sure it does not support anything except es3 (no, 'map', 'reduce', 'forEach', etc). For everyone interested in playing with it there will be a link to it.</p>
  
  <p>My target: JS -> TS, grunt -> webpack, build inclusion order -> ES modules (import/export), home cooked modules -> NPM alternatives and so on..</p>
  
  <p>Actual task: I am trying to import core-js package to fullfill missed stuff and faced with issue that <a href="https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/global.js" rel="nofollow noreferrer">https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/global.js</a> is not able to properly detect/find global object.</p>
  
  <p>That file bring me to next links:</p>
  
  <ul>
  <li><a href="https://github.com/zloirock/core-js/issues/86#issuecomment-115759028" rel="nofollow noreferrer">https://github.com/zloirock/core-js/issues/86#issuecomment-115759028</a></li>
  <li><a href="https://stackoverflow.com/questions/3277182/how-to-get-the-global-object-in-javascript?noredirect=1&amp;lq=1">How to get the global object in JavaScript?</a></li>
  <li><a href="https://stackoverflow.com/questions/9642491/getting-a-reference-to-the-global-object-in-an-unknown-environment-in-strict-mod">Getting a reference to the global object in an unknown environment in strict mode</a></li>
  <li><a href="https://stackoverflow.com/questions/8645685/is-there-an-environment-agnostic-way-to-detect-javascript-host-objects">Is there an environment-agnostic way to detect Javascript Host Objects?</a></li>
  </ul>
  
  <p>I believe I tried all suggestion (<a href="https://gist.github.com/ZuBB/017c40f4d68396428458660e6604f765" rel="nofollow noreferrer">https://gist.github.com/ZuBB/017c40f4d68396428458660e6604f765</a>) from those links but that does not help - <a href="https://drive.google.com/open?id=1XdQpryaOsJ2CFdF0Qh5c1u6GvPkJAIAl" rel="nofollow noreferrer">https://drive.google.com/open?id=1XdQpryaOsJ2CFdF0Qh5c1u6GvPkJAIAl</a>.</p>
  
  <p>I would be grateful for any ideas how to get the reference to global object</p>
  
  <p>gist with platform-related links: <a href="https://gist.github.com/ZuBB/7e3e76c7629518671e209148fc0d2b6a" rel="nofollow noreferrer">https://gist.github.com/ZuBB/7e3e76c7629518671e209148fc0d2b6a</a></p>