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

delete() and "?" #97

Closed
stevenvachon opened this issue Jun 30, 2017 · 6 comments
Closed

delete() and "?" #97

stevenvachon opened this issue Jun 30, 2017 · 6 comments

Comments

@stevenvachon
Copy link
Contributor

stevenvachon commented Jun 30, 2017

const nativeURL = require("url").URL;
const shimmedURL = require("whatwg-url").URL;

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

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

Pretty sure that the native one is correct. @TimothyGu ?

@TimothyGu
Copy link
Member

What do browsers do?

@TimothyGu
Copy link
Member

TimothyGu commented Jul 1, 2017

I'm reasonably certain that Node.js' behavior is the faulty one here.

Can you file an issue at node instead?

@stevenvachon
Copy link
Contributor Author

Chrome and Firefox both behave like Node.js

@stevenvachon
Copy link
Contributor Author

Ok, nodejs/node#14020

@TimothyGu
Copy link
Member

Added this case to WPT in web-platform-tests/wpt#6445. Will apply the fix to Node.js after the PR is merged.

@TimothyGu
Copy link
Member

This should be reopened now that whatwg/url#336 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants