Closed Bug 1105677 Opened 9 years ago Closed 9 years ago
URLSearch Params from ns Doc Shell
|location.searchParams| implemented in Bug 1037715 is not available in the latest Aurora (35) nor Nightly (36). The source still has the attribute: http://dxr.mozilla.org/mozilla-central/source/dom/webidl/URLUtils.webidl A workaround is |new URLSearchParams(location.search.substr(1))| but I just wanted to it. Any ideas?
It was disabled in bug 1082734.
I cannot access Bug 1082734 but understood. I'll update the docs and close the bug.
Annevk, do we have a solution for this? updating the spec, or proposing a new approach?
Closing for now.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
So what I think we should do is remove searchParams completely and make URLSearchParams take (URL or HTMLAreaElement or HTMLAnchorElement or Location or WindowLocation) as argument to extract a url's query more easily.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
You mean WorkerLocation, not WindowLocation, right? I'm probably fine with that....
Did it shipped in a released version (34), then has been removed in 35, or has it been removed before 34 released? (Can't get the information from the security bug)
I cannot find this in 34 as well.
> Did it shipped in a released version (34) No. location.searchParams has never shipped in a release version.
Thanks, so the wiping of this in MDN was the right thing to do :-)
Reset the ddn keyword, so that we document what is proposed in comment 6, once defined and implemented.
The spec is changed. Currently we don't have URLSearchParams in location so we can get rid of the URLSearchParam obj in the docShell.
Attachment #8625474 - Flags: review?(bugs)
Anne, is the idea then to have something like .clear() in URLSearchParams? Though, I guess one can always use url.search = "";
Hrm, that comment was for Bug 1174731.
Comment on attachment 8625474 [details] [diff] [review] usp1.patch Uh, URLSearchParams was odd when it could be used with several things implementing URLUtils. I wonder why searchParams ever was non-readonly attribute. Please remove the comment from Location.webidl
Attachment #8625474 - Flags: review?(bugs) → review+
And change the title of this bug ;)
Summary: location.searchParams is missing → Remove GetURLSearchParams from nsDocShell
Landed with the wrong number (missing the second 7) - https://hg.mozilla.org/mozilla-central/rev/1e2fe1098aab
Basically, we need to finish this page: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
Yes, and this is covered by the dev-doc-needed on bug 887836 (initial implementation, Fx 29) and bug 1174731 (making it read-only, Fx 41). Calling this specific bug as done.
You need to log in before you can comment on or make changes to this bug.