Closed Bug 1174731 Opened 6 years ago Closed 6 years ago
Params attribute readonly
This would significantly simplify the complexity of the object and not really reduce the functionality.
(I will update the specification if this is successful, as far as I know we're still the only ones implementing this.)
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.
Anne, is the idea then to have something like .clear() in URLSearchParams? Though, I guess one can always use url.search = "";
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.
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-
Comment on attachment 8625786 [details] [diff] [review] usp3.patch I received a r+ from annevk in 'real life'.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27596 will fix this specification-wise.
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?
> 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.
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
You need to log in before you can comment on or make changes to this bug.