Closed
Bug 1174731
Opened 10 years ago
Closed 10 years ago
Make searchParams attribute readonly
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: annevk, Assigned: baku)
References
Details
(Keywords: dev-doc-needed, site-compat, user-doc-needed)
Attachments
(2 files, 1 obsolete file)
29.72 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
3.43 KB,
patch
|
Details | Diff | Splinter Review |
This would significantly simplify the complexity of the object and not really reduce the functionality.
Reporter | ||
Comment 1•10 years ago
|
||
(I will update the specification if this is successful, as far as I know we're still the only ones implementing this.)
Reporter | ||
Comment 2•10 years ago
|
||
To clarify, the reason the specification is not changed is because this rather simplifies URLSearchParams as the relationship to URL objects becomes 1:1. I'd like to make sure we can land this without issue as otherwise I end up changing the specification twice.
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8625476 -
Flags: review?(bugs)
Comment 4•10 years ago
|
||
Anne, is the idea then to have something like .clear() in URLSearchParams?
Though, I guess one can always use url.search = "";
Flags: needinfo?(annevk)
Updated•10 years ago
|
Attachment #8625476 -
Flags: review?(bugs) → review+
Reporter | ||
Comment 5•10 years ago
|
||
Yeah, we could add new methods later. Need to figure out what kind of methods make sense for multimap objects. Note that FormData/URLSearchParams/Headers are extremely close in terms of API.
Flags: needinfo?(annevk)
Assignee | ||
Updated•10 years ago
|
Keywords: user-doc-needed
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8625778 -
Flags: review?(annevk)
Reporter | ||
Comment 7•10 years ago
|
||
Comment on attachment 8625778 [details] [diff] [review]
usp3.patch
Review of attachment 8625778 [details] [diff] [review]:
-----------------------------------------------------------------
Please lose the indentation so that the word "attribute" is aligned with the lines before. Also, this should be a new URLUtilsSearchParams interface, no?
Attachment #8625778 -
Flags: review?(annevk) → review-
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8625778 -
Attachment is obsolete: true
Attachment #8625786 -
Flags: review?(annevk)
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8625786 [details] [diff] [review]
usp3.patch
I received a r+ from annevk in 'real life'.
Attachment #8625786 -
Flags: review?(annevk)
Comment 11•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9c93813baadc
https://hg.mozilla.org/mozilla-central/rev/44002ebe4e2c
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Reporter | ||
Comment 12•10 years ago
|
||
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27596 will fix this specification-wise.
Keywords: dev-doc-needed
Comment 13•10 years ago
|
||
It breaks my BzDeck app :(
https://github.com/bzdeck/bzdeck/blob/master/webroot/static/scripts/controllers/base.js#L21
Why searchParams is readonly even on new URL?
Keywords: site-compat
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(annevk)
Reporter | ||
Comment 14•10 years ago
|
||
> Why searchParams is readonly even on new URL?
Because 1:1 is much better than 1:M and you can simply assign to .search instead.
Flags: needinfo?(annevk)
Comment 15•10 years ago
|
||
Thanks, url.search works for me.
https://github.com/bzdeck/bzdeck/commit/c0841f7f0bfe17fac71b606be6b3777049aea6dc
Documented on the site compat doc.
https://developer.mozilla.org/en-US/Firefox/Releases/41/Site_Compatibility#DOM
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•