paulmillr / es6-shim

ECMAScript 6 compatibility shims for legacy JS engines
http://paulmillr.com
MIT License
3.11k stars 389 forks source link

Cannot import es6-shim in web worker #247

Closed david-risney closed 10 years ago

david-risney commented 10 years ago

A call to importScripts('es6-shim.js'); in a web worker fails with

es6-shim.js(52): Uncaught ReferenceError: window is not defined 

I see this in latest IE & Chrome. Thankfully it looks like the issue is somewhat superficial. I can replace or guard the references to window and it appears to resolve the issue. I'll put up a pull request in a moment.