Skip to content
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#searchParams#delete removes "?" #14020

Closed
stevenvachon opened this issue Jul 1, 2017 · 3 comments
Closed

URL#searchParams#delete removes "?" #14020

stevenvachon opened this issue Jul 1, 2017 · 3 comments
Labels
confirmed-bug Issues with confirmed bugs. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Comments

@stevenvachon
Copy link

stevenvachon commented Jul 1, 2017

const {URL} = require("url");

const url = new URL("http://host/?param");
url.searchParams.delete("param");
url.href;
//-> http://host/

It should produce http://host/? according to @TimothyGu.

@vsemozhetbyt vsemozhetbyt added the whatwg-url Issues and PRs related to the WHATWG URL implementation. label Jul 1, 2017
@TimothyGu TimothyGu added the confirmed-bug Issues with confirmed bugs. label Jul 1, 2017
@TimothyGu
Copy link
Member

I added this test case to WPT in web-platform-tests/wpt#6445. Let's fix it in Node.js after that PR is merged, since our current behavior seems to be the same as many browsers.

@TimothyGu
Copy link
Member

The behavior was changed after #10480 (which, comically, was also filed by @stevenvachon).

@stevenvachon
Copy link
Author

whatwg/url#336

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants