Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

URL polyfill doesn't work in workers #93

Open
ianloic opened this issue Mar 16, 2016 · 2 comments
Open

URL polyfill doesn't work in workers #93

ianloic opened this issue Mar 16, 2016 · 2 comments

Comments

@ianloic
Copy link

ianloic commented Mar 16, 2016

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
Copy link
Author

ianloic commented Mar 16, 2016

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

@inexorabletash
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants