Closed Bug 1370826 Opened 8 years ago Closed 6 years ago

Add parameters names in Function grip

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox73 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It would be quite nice if the grip contains the parameters of a function so we can display them in the console. This should handle simple cases as a first step : ``` function foo(a, b) {} ``` would have a `parameters` property containing `["a", "b"]`. In a follow-up, it would be nice if we could handle more elaborated cases like: ``` // default values function foo(a = 2, b = c){} // destructuring function foo({ x: _x = 20, y }, [a, b]){} // rest function foo(a, b, ...rest){} ```
Priority: -- → P3
Product: Firefox → DevTools
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

For some reason the parameterNames was expected as
a prop, but it's available on the function grip
itself.
The rep is fixed, and tests are modified to reflect
this change.

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5fe8330c1912 Render parameter names in function rep. r=Honza.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ea980df5548 Render parameter names in function rep. r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
Flags: needinfo?(nchevobbe)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: