Strip leading '?' in `new URLSearchParams(query)`

RESOLVED FIXED in Firefox 49

Status

()

Core
DOM
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: ziyunfei, Assigned: baku)

Tracking

({dev-doc-complete})

unspecified
mozilla49
dev-doc-complete
Points:
---

Firefox Tracking Flags

(firefox49 fixed)

Details

(Whiteboard: [DocArea=DOM])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
> new URLSearchParams("?a=1").get("a")
null // should be "1"

see https://github.com/whatwg/url/issues/81, already in Chrome 52
(Reporter)

Updated

2 years ago
Keywords: dev-doc-needed
Whiteboard: [DocArea=DOM]
(Assignee)

Updated

2 years ago
Assignee: nobody → amarchesini
(Assignee)

Comment 1

2 years ago
Created attachment 8746454 [details] [diff] [review]
urlSearchParams.patch
Attachment #8746454 - Flags: review?(bugs)
Comment on attachment 8746454 [details] [diff] [review]
urlSearchParams.patch

Please test also passing just '?', and '?=1' and something like that.
Attachment #8746454 - Flags: review?(bugs) → review+

Comment 3

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/036a3dabb720

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/036a3dabb720
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox49: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Added a sentence in the description of https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams
and
https://developer.mozilla.org/en-US/Firefox/Releases/49#DOM_HTML_DOM
Keywords: dev-doc-needed → dev-doc-complete
(Assignee)

Updated

a year ago
Duplicate of this bug: 1300334
You need to log in before you can comment on or make changes to this bug.