Show Headers object entries in ObjectInspector
Categories
(DevTools :: Console, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: mmis1000, Unassigned)
Details
Attachments
(1 file)
24.34 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.9 Safari/537.36
Steps to reproduce:
Open example page of fetch on mdn
https://mdn.github.io/fetch-examples/fetch-response/
Open developer tool
Actual results:
The Headers object do not show any entry in the preview.
Spread the object gives you all the entries.
They just didn't show up in preview.
Expected results:
The Header object behaves like Map / WeakMap and display the entries in preview
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Alternative STR:
- Open the console
- Evaluate the following
h = new Headers()
h.set("a", 1)
h.set("b", 2)
h;
Expected Result:
Headers { "a" → 1, "b" → 2 }
is displayed in the console
Expanding the object shows
▼ Headers
| ▼ <entries>
| | a: 1
| | b: 2
| <prototype>
for what it's worth, Chrome isn't showing the entries either
A workaround is to use Object.fromEntries(h.entries())
so it prints an object with the header entries
Updated•3 years ago
|
Description
•