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

Unable to set querystring #22

Closed
zhonghao-cliqz opened this issue Oct 16, 2019 · 2 comments
Closed

Unable to set querystring #22

zhonghao-cliqz opened this issue Oct 16, 2019 · 2 comments

Comments

@zhonghao-cliqz
Copy link

For the following snippet,

let url = new URL('https://github.com');
url.searchParams.set('key', 'value');
console.log(url.href);

Standard URL returns https://github.com/?key=value while url-parser gives me https://github.com.

If this is out of the scope of this library (I guess is being a super fast parser), feel free to close the issue.

@sammacbeth
Copy link
Contributor

Changes to search params are currently not propagated to the URL object they are in. Ideally this library should be compatible with the standard URL, so we should fix this.

@sammacbeth
Copy link
Contributor

Fixed in v1.1.1

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