Closed
Bug 966177
Opened 11 years ago
Closed 11 years ago
Show the content of Set and Map
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 862583
People
(Reporter: kohei, Unassigned)
Details
It would be nice if the Console can show the content of a ES6 Set, Map and WeakMap, like an Object or Array. Currently it only shows the size of the object.
Comment 1•11 years ago
|
||
I guess we could use nondeterministicGetWeakMapKeys for WeakMaps, but I'm entirely sure it's a good idea to do so for our VariablesView. :) Worst case scenario, you could inspect an weak map and some of its contents become gc'd while you're inspecting it.
Comment 2•11 years ago
|
||
The console does previews for Set and Map, like it does for Arrays/Objects. WeakMaps do not get the special treatment.
Kohei: do you want to see the set/map elements in the object inspector, in the sidebar?
Summary: Show the content of Set, Map, WeakMap → Show the content of WeakMap
Comment 3•11 years ago
|
||
I think, he means the variables view in console (and other places too) and not the pretty output.
Summary: Show the content of WeakMap → Show the content of Set, Map, WeakMap
Comment 4•11 years ago
|
||
In comment 1 I meant to say "I'm *not* entirely sure". Using nondeterministicGetWeakMapKeys is most likely a bad idea in this particular case.
Reporter | ||
Comment 5•11 years ago
|
||
Yes, I meant so. Set and Map are iterable since Firefox 17, right?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
Reporter | ||
Comment 6•11 years ago
|
||
WeakMap is something special, so let's do this for Set and Map first. It would be helpful for developers who are interested in ES6.
Summary: Show the content of Set, Map, WeakMap → Show the content of Set and Map
Comment 7•11 years ago
|
||
As Mihai said, the console is already handling this for Maps and Sets. If we're talking about showing this in the VariablesView, we have a bug 862583 for that.
Reporter | ||
Comment 8•11 years ago
|
||
Oh cool, thanks.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•