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

The href setter needs to reset the query object #117

Closed
SimonSapin opened this issue Apr 22, 2016 · 2 comments
Closed

The href setter needs to reset the query object #117

SimonSapin opened this issue Apr 22, 2016 · 2 comments
Labels
good first issue Ideal for someone new to a WHATWG standard or software project topic: api

Comments

@SimonSapin
Copy link
Contributor

The href setter of URL objects is currently:

Let parsedURL be the result of running the basic URL parser on the given value.
If parsedURL is failure, throw a TypeError exception.
Set context object’s url to parsedURL.

This looks like it’s missing additional steps to propagate the change to searchParams, as tested in https://github.com/w3c/web-platform-tests/blob/0a518aaff/url/url-constructor.html#L121-L123. Something like:

Let query be parsedURL’s query, if that is non-null, and the empty string otherwise.
Set context object’s query object to a new URLSearchParams object using query, and then set that query object’s url object to context object.

(Similar to what the URL constructor does.)

@annevk annevk added topic: api good first issue Ideal for someone new to a WHATWG standard or software project labels Apr 22, 2016
SimonSapin added a commit to servo/servo that referenced this issue Apr 22, 2016
SimonSapin added a commit to servo/servo that referenced this issue Apr 22, 2016
SimonSapin added a commit to servo/servo that referenced this issue Apr 22, 2016
SimonSapin added a commit to servo/servo that referenced this issue Apr 23, 2016
SimonSapin added a commit to servo/servo that referenced this issue Apr 23, 2016
SimonSapin added a commit to servo/servo that referenced this issue Apr 23, 2016
@nox
Copy link
Member

nox commented May 22, 2016

Shouldn't rather the associated URLSearchParams instance be updated?

@annevk
Copy link
Member

annevk commented Oct 14, 2016

Yeah, we should update the associated instance. So we can use [SameObject].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Ideal for someone new to a WHATWG standard or software project topic: api
Development

No branches or pull requests

3 participants