-
Notifications
You must be signed in to change notification settings - Fork 92
URLSearchParams.prototype.sort() is missing #22
Comments
What's the use case for this? |
I saw it as a blocker for jsdom/whatwg-url adoption, but sounds like that is not going to happen anyway. Mainly wanted to have a proper issue for this open so this is visible for users. |
Also, this is absolutely unfair after all the contribution to specs compliant polyfill I've done for 16 years. And after someone insulting me I end up being the one with an attitude? What the hell is wrong with Donenic ! |
Where did you read that? I just said it's not on my priority list 'cause I've never needed it. It looks like Domenic will ever accept anything from me but that's an issue for jsdom, not an issue for this poly. |
That's just the impression I got from jsdom/whatwg-url#37 (comment) I don't want to take any side here or judge anyone, I hope you understand that. I think it would be awesome for the community if we all worked together to fix what needs to be fixed and get this into jsdom/whatwg-url, but I am not in the position to make this happen. |
Until the community tolerates these kind of developers and I get the blame for someone with an attitude toward standards I've advocated and promoted a lifetime, I think we have way more important things to solve as community. |
btw, apparently not a single browser is implementing this |
Node 7 has it implemented: > require('url').URLSearchParams.prototype
URLSearchParams {
append: [Function: append],
delete: [Function: delete],
get: [Function: get],
getAll: [Function: getAll],
has: [Function: has],
set: [Function: set],
sort: [Function: sort],
entries: [Function: entries],
forEach: [Function: forEach],
keys: [Function: keys],
values: [Function: values],
toString: [Function: toString] } |
in my node 7.2.1 this returns undefined anyway, I'll try to update the poly with a simple sort implementation first and see how it goes. At the end, if the goal is to be consistent with the browser cache results (which is the use case I was missing) it looks like it doesn't matter as long as items are sorted consistently every single time so that a simple I will compare results this evening and see what's the outcome. |
I am running Node 7.7.0 |
will try that out this evening. Thanks |
As requested in order to fix #22. The method is patched for native constructors that haven't implemented it yet. However, even constructoring via records or sequences might be broken. In those cases there is still no patch or the whole constructor needs to be substituted. TODO: decide if it's the case to feature detect upfront and globally replace the class if not standard also probably return strings like native (quite some work, not sure if worth it)
The method is defined in the spec here: https://url.spec.whatwg.org/#interface-urlsearchparams
The method is currently missing.
The text was updated successfully, but these errors were encountered: