-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL
polyfill does not throw for invalid input
#53
Comments
I've looked around at a few other
|
If we switch to a different polyfill, then my preference would be to use https://www.npmjs.com/package/whatwg-url The contributors there are also browser implementers, I trust them more to get this right. Can we handle transpiling? |
Could you write specific issues with it? |
@zloirock Here's an example of a failing test: [...new URLSearchParams('?%C2').keys()][0]
// core-js -> "%C2"
// native -> "�" |
Is that with |
@mhassan1 yes, I know that |
@romainmenke That's with delete global.URLSearchParams;
var URLSearchParams = require('core-js/web/url-search-params');
[...new URLSearchParams('?%C2').keys()][0];
// -> "%C2" @zloirock Here's the list of failing tests:
|
The existing
URL
polyfill does notthrow
for invalid input when it should; for example, all of these shouldthrow
:This issue was raised previously (https://github.com/JakeChampion/polyfill-library/issues/462), but it was never resolved, and there was a PR (https://github.com/JakeChampion/polyfill-library/pull/627) that was closed without comment.
There seem to be a bunch of existing
URL
polyfills out there, so maybe we should switch to a different one.The text was updated successfully, but these errors were encountered: