Add context menu item to the context menu in the Elements panel of the Developer Tools

137 views
Skip to first unread message

Iran Reyes

unread,
Jan 7, 2016, 1:43:59 AM1/7/16
to Google Chrome Developer Tools
A long time ago I want a functionality in the Elements tab of the Developer Tool that let me save a node of the DOM into a variable accessible from the Javascript Console. All the time I have to open the js console and write getElementByID, querySelector, etc. This functionality could be implemented in the developer tool or let us open a door in the API to add items to the context menu. I attached an image self explanatory.
Untitled-1.png

PhistucK

unread,
Jan 7, 2016, 1:47:12 AM1/7/16
to Google Chrome Developer Tools
I reckon you never heard of the magic $0 variable, right? :)
Select an element in the Elements panel and go to the console. Enter -
$0
This magic variable always holds the currently selected element.
($0, $1, $2, $3, $4, $5 hold the last six selected variables)


PhistucK

On Thu, Jan 7, 2016 at 5:17 AM, Iran Reyes <iranreye...@gmail.com> wrote:
A long time ago I want a functionality in the Elements tab of the Developer Tool that let me save a node of the DOM into a variable accessible from the Javascript Console. All the time I have to open the js console and write getElementByID, querySelector, etc. This functionality could be implemented in the developer tool or let us open a door in the API to add items to the context menu. I attached an image self explanatory.

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/e263fb1b-1d43-49f6-a995-70c299c6a545%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Laster

unread,
Jan 7, 2016, 9:24:57 AM1/7/16
to Google Chrome Developer Tools

PhistucK

unread,
Jan 7, 2016, 9:33:19 AM1/7/16
to Google Chrome Developer Tools
No longer open, though. :(


PhistucK

Jason Laster

unread,
Jan 7, 2016, 10:14:19 AM1/7/16
to Google Chrome Developer Tools
Interesting, I believe there are two open patches for that issue though, so i'm not sure if one will be merged or not.




PhistucK

unread,
Jan 7, 2016, 10:19:12 AM1/7/16
to Google Chrome Developer Tools
Both of the issues are closed. Also, the first has issues and the contributor abandoned it.

Unless an external contributor picks this up again, this is not going to happen, I guess.


PhistucK

Jason Laster

unread,
Jan 7, 2016, 11:15:31 AM1/7/16
to google-chrome-...@googlegroups.com
Oh interesting, sorry not great at reading crbug

On Thu, Jan 7, 2016 at 1:47 AM PhistucK <phis...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages