Open hzr opened 7 years ago
The problem with the patch as-is is that several browser implementations shipped a version without sort(). That means very old browsers would use the full polyfill with sort(), and very new browsers don't need the polyfill. But in between there are browsers that would have URLSearchParams but no sort() (such as the current versions of Chrome)
To add this safely it'll be necessary to include a polyfill for a native URLSearchParams without sort().
Yes, good point. I can look into this when I have the time.
Thanks! I greatly appreciate the PR submission and especially the inclusion of tests.
Also, obviously, CI running on PRs would catch this, but I haven't been spending any time on this project lately. :(
https://url.spec.whatwg.org/#dom-urlsearchparams-sort