New issue
Advanced search Search tips

Issue 772054 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

URLSearchParams will not take Object as init

Reported by glroyla...@gmail.com, Oct 5 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Steps to reproduce the problem:
1. following example at https://url.spec.whatwg.org/
2. var urlSearch = new URLSearchParams({ key: "1234" });
3. urlSearch.set("dog", "Fido"); // optional
4. console.log(urlSearch.toString());
5. prints out: %5Bobject+Object%5D=&dog=Fido

What is the expected behavior?
Should print: key=1234&dog=Fido

What went wrong?
the init parameter for URLSearchParms() failed to follow specification.
At 6.2 URLSearchParms class
At step 3: for a record, add key/value

The code works for step 2 / sequence of pairs:
var urlSearch = new URLSearchParams( [ ["key", "1234"] ] );

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3112.113  Channel: n/a
OS Version: 10.0
Flash Version:
 

Comment 1 by woxxom@gmail.com, Oct 5 2017

It's implemented in Chrome 61 and newer, not in 60, as you can see in the platforms status:
https://www.chromestatus.com/feature/5737549880360960

Thanks.
Cc: jmukthavaram@chromium.org
Labels: Needs-Milestone Needs-Feedback
glroylance@,
Could you please check this issue on latest chrome stable-61.0.3163.100 & Canary-63.0.3233.0 versions as per C#1 & let us know your observations on the same to proceed further.

Thanks in advance.!!
Tried Chrome 61.0.3163.100, and it did the right thing. There was a bonus: .sort is present and works.

I haven't tried throwing a URLSearchParam at an HTTPRequest.send().
Project Member

Comment 5 by sheriffbot@chromium.org, Oct 6 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "jmukthavaram@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Feedback
glroylance@: Could you please confirm whether we can close this issue as per Comment #4

Thanks..!


confirm close
Project Member

Comment 8 by sheriffbot@chromium.org, Oct 10 2017

Cc: rkalavakuntla@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "rkalavakuntla@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Unconfirmed)

Comment 10 Deleted

Sign in to add a comment