-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
URLSearchParams.prototype.sort() #4531
Conversation
See whatwg/url#26 for context.
Notifying @Sebmaster, @domenic, @mikewest, @rubys, @sideshowbarker, @smola, @tomalec, @xiaojunwu, and @zcorpan. (Learn how reviewing works.) |
This method is added to increase cache hits when making requests. It’s opt-in as the order of code points in a URL’s query is significant by default. It’s up to applications to decide if name order is not significant for them. Tests: web-platform-tests/wpt#4531. Fixes #26.
ChromeTesting revision 1a4a2cd All results/url/urlsearchparams-sort.html
|
FirefoxTesting revision 1a4a2cd All results/url/urlsearchparams-sort.html
|
"input": "\uFFFD=x&\uFFFC&\uFFFD=a", | ||
"output": [["\uFFFC", ""], ["\uFFFD", "x"], ["\uFFFD", "a"]] | ||
} | ||
].forEach((val) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need at least a few tests on Unicode inputs, to show what type of sorting is being applied here. I assume it's just going to be by character code, so instead of sorting é near e, it'll sort after the usual alphabet? Tests to confirm.
What do you think? |
This method is added to increase cache hits when making requests. It’s opt-in as the order of code points in a URL’s query is significant by default. It’s up to applications to decide if name order is not significant for them. Tests: web-platform-tests/wpt#4531. Fixes #26.
Fixes: nodejs#10760 Ref: whatwg/url#26 Ref: whatwg/url#199 Ref: web-platform-tests/wpt#4531
PR-URL: #11098 Fixes: #10760 Ref: whatwg/url#26 Ref: whatwg/url#199 Ref: web-platform-tests/wpt#4531 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
PR-URL: #11098 Fixes: #10760 Ref: whatwg/url#26 Ref: whatwg/url#199 Ref: web-platform-tests/wpt#4531 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Backport-of: nodejs#11098 Fixes: nodejs#10760 Ref: whatwg/url#26 Ref: whatwg/url#199 Ref: web-platform-tests/wpt#4531
Backport-of: nodejs#11098 Fixes: nodejs#10760 Ref: whatwg/url#26 Ref: whatwg/url#199 Ref: web-platform-tests/wpt#4531
Backport-of: #11098 Fixes: #10760 Ref: whatwg/url#26 Ref: whatwg/url#199 Ref: web-platform-tests/wpt#4531
See whatwg/url#26 for context.