inexorabletash / polyfill

JavaScript Polyfills, Shims and More
Other
1.36k stars 354 forks source link

URL polyfill doesn't work in workers #93

Open ianloic opened 8 years ago

ianloic commented 8 years ago

The URL polyfill depends on document and/or window so it can't work in workers. Specifically I'm having issues with it in IE11 in a worker.

ianloic commented 8 years ago

FWIW, for my very simple uses (relative URL resolution) this seems to work: https://github.com/github/url-polyfill/blob/master/url.js

inexorabletash commented 8 years ago

Yeah, mine relies on an anchor tag to do the heavy lifting rather than reimplementing the browser's built in parser. That other one is missing most of the useful stuff like URLSearchParams.