Open ianloic opened 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
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.
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.