Closed
Bug 1460530
Opened 7 years ago
Closed 6 years ago
JSTerm autocompletion should reveal getters
Categories
(DevTools :: Console, defect, P2)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1499289
People
(Reporter: Honza, Unassigned)
References
(Blocks 1 open bug)
Details
JSTerm autocompletion should also offer getters for objects.
Let's see the following example:
Code on the page:
var customer = {
get age() { return 40; },
get name() { return "John"; },
address: "Hawaii",
}
var store = {
getCustomer() { return person; }
}
Expression in JSTerm:
`window.store.getPerson().`
The autocompletion should show:
* address
* age
* name
* (etc. like standard object methods & props)
The actual result value of the expression/getter can be previewed using eager evaluation feature (see bug 1460518)
So e.g. when the user selects `name` getter offered by the autocompletion popup
(but doesn't press the enter yet), the instant result preview should show `John`.
Honza
Updated•7 years ago
|
Priority: P3 → P2
Whiteboard: [boogaloo-mvp]
Updated•7 years ago
|
Product: Firefox → DevTools
| Reporter | ||
Comment 1•7 years ago
|
||
Fixed version of the example from comment #0
var customer = {
get age() { return 40; },
get name() { return "John"; },
address: "Hawaii",
}
var store = {
get customer() { return customer; },
getCustomer() { return customer; },
}
Expression in JSTerm:
`window.store.getCustomer().`
or
`window.store.customer.`
Should show:
* address
* age
* name
* (etc. like standard object methods & props
Honza
Updated•7 years ago
|
Priority: P2 → P3
Whiteboard: [boogaloo-mvp] → [boogaloo-reserve]
Updated•7 years ago
|
Whiteboard: [boogaloo-reserve] → [boogaloo-mvp]
Updated•7 years ago
|
Priority: P3 → P2
Comment 2•6 years ago
|
||
Honza, how is this different from https://bugzilla.mozilla.org/show_bug.cgi?id=1460530 ? Do we want to be able to automatically execute side-effects free getters?
Flags: needinfo?(odvarko)
| Reporter | ||
Comment 3•6 years ago
|
||
(In reply to Nicolas Chevobbe from comment #2)
> Honza, how is this different from
> https://bugzilla.mozilla.org/show_bug.cgi?id=1460530 ? Do we want to be able
> to automatically execute side-effects free getters?
Sorry for the delay!
Your link points back to this bug, is that a copy-paste typo?
Honza
Flags: needinfo?(odvarko) → needinfo?(nchevobbe)
Updated•6 years ago
|
Flags: needinfo?(odvarko)
| Reporter | ||
Comment 5•6 years ago
|
||
Yep, you are right, marking as duplicate.
Honza
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(odvarko)
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Whiteboard: [boogaloo-mvp]
You need to log in
before you can comment on or make changes to this bug.
Description
•