Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: don't update URL immediately on update to URLSearchParams #51520
url: don't update URL immediately on update to URLSearchParams #51520
Changes from 14 commits
2b2d11b
129a1a9
c2e8526
039380e
e015de2
2487726
b0270bc
d9c5381
a05675c
310d275
b118a90
916374e
319eaa0
0c44fb6
065c45c
0d0fef8
e9c4da2
04f53a7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function can just be
this.href
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I fine to also swap
toString
to usinghref
, even though its technically defined after?or should
href
andtoJSON
both switch to being backed bytoString
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toJSON and toString should call this.href, since technically they are
href
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching these over to
return this.href
results in some WPT failures 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because you need private property access to check if the current
this
is same as URL. I forgot about this!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I do this though, the WPT tests pass, but
parallel/test-whatwg-url-invalidthis
is still failing:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking this through more, is this throwing a different exception now because it is trying to access a private method first (
#ensureSearchParamsUpdated
), instead of a private property (#context
)? If so, is it fine to just update the test to expect this new exception?