Closed Bug 1684888 Opened 5 years ago Closed 3 years ago

Show Headers object entries in ObjectInspector

Categories

(DevTools :: Console, enhancement, P3)

Firefox 86
enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1778268

People

(Reporter: mmis1000, Unassigned)

Details

Attachments

(1 file)

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

Summary: Firefox didn't show Headers object entries → Firefox devtool didn't show Headers object entries
Component: Untriaged → Console
Product: Firefox → DevTools

Alternative STR:

  1. Open the console
  2. 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

Severity: -- → S3
Type: defect → enhancement
Priority: -- → P3
Summary: Firefox devtool didn't show Headers object entries → Show Headers object entries in ObjectInspector
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Duplicate of bug: 1778268
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: