Closed Bug 1777587 Opened 2 years ago Closed 2 years ago

Preview support for URLSearchParams objects.

Categories

(DevTools :: Object Inspector, enhancement)

enhancement

Tracking

(firefox104 fixed)

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: evilpie, Assigned: nchevobbe)

References

Details

Attachments

(2 files)

I started working on something that will show URLSearchParams similar to Maps. I did get some simple ones without duplicate keys working. For duplicate keys I am trying to return an array of values for every duplicate key, but that just shows as "Restricted".

The inline preview like map Map { a -> 1 } also doesn't work. Just <entries>.

If someone would like to just take this over that would be fine too.

Maybe it would be better to show new URLSearchParams("?a=1&a=2"); as

<entries>
0: a -> 1
1: a -> 2

after all.

Thanks Tom, I definitely hit that in the past and I agree it would be nice to have a way to inspect this
I'll have a quick look at your WIP

(In reply to Tom Schuster [:evilpie] from comment #2)

Maybe it would be better to show new URLSearchParams("?a=1&a=2"); as

<entries>
0: a -> 1
1: a -> 2

after all.

yeah, I think it would be better to reflect what URLSearchParams#entries returns

So I have something working locally, I need to do further testing and add tests.
Here I'm showing entries with same name as different items, prefixed with the entry index. I think it's nice to match the behavior of URLSearchParams.prototype.entries

If you're curious evilpie:

Oh that looks great. I think in my testing properties with the same name under <entries> were being de-duplicated, but it seems like you are already solved that issue or I made some other mistake.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Attachment #9283733 - Attachment description: WIP: Bug 1777587 - Preview support for URLSearchParams objects. → Bug 1777587 - [devtools] Preview support for URLSearchParams objects. r=ochameau.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d30a9af34461
[devtools] Preview support for URLSearchParams objects. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: