Open
Bug 725314
Opened 13 years ago
Updated 3 years ago
Inspector should expose previously highlighted elements to JavaScript
Categories
(DevTools :: Inspector, enhancement, P3)
DevTools
Inspector
Tracking
(Not tracked)
NEW
People
(Reporter: cedricv, Unassigned)
Details
(Keywords: parity-chrome)
Currently, we only expose the current highlighted element with $0 in JS.
It would be handy to push the previouslyy highlighted element to $1 then $2 and so on (as Web Inspector does).
Comment 1•13 years ago
|
||
So $n will always be different every time we select a new node.
So if you want to repeat a command, you'll have to increment $n every time.
Can we get something smarter? (not sure if it's possible).
| Reporter | ||
Comment 2•13 years ago
|
||
(In reply to Paul Rouget [:paul] from comment #1)
> So $n will always be different every time we select a new node.
Nope. Steps are:
1) select <body>, it goes to $0 (as usual)
2) select <h1>, it goes to $0, <body> goes to $1
3) select <span>, it goes to $0, <h1> goes to $2
At step 3, <body> is still at $1 (it was the first highlighted element).
| Reporter | ||
Comment 3•13 years ago
|
||
(In reply to Cedric Vivier [:cedricv] from comment #2)
> 1) select <body>, it goes to $0 (as usual)
Or <body> can be set directly to both $0 and $1 here.
> 2) select <h1>, it goes to $0, <body> goes to $1
<h1> directly to $0 and $2.
etc.
| Reporter | ||
Comment 4•13 years ago
|
||
What's described in comment #2 and #3 is not how Chrome does it (I thought it did :D - well I never went farther than $1), but yeah, I think Paul is right we can be smarter and keep incrementing instead of pushing.
Updated•11 years ago
|
Whiteboard: [chrome-parity] → [parity-chrome]
Comment 6•7 years ago
|
||
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-chrome
Whiteboard: [parity-chrome]
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•