«   Previous tip Next tip   »

Chrome DevTools: Shortcuts to access the DOM in JavaScript from the Console Panel

Last updated: 20th July 2020
Shortcuts to access the DOM in JavaScript from the Console Panel

If you right click on a DOM Node in the Elements Panel, you can select Store as global variable which gives you quick access to that node from the Console Panel.

The JavaScript variables are named temp1, temp2, temp3 and so on.

As a 🔥️ bonus tip, you can always use the shortcut $0 within the Console Panel which gives you access to the currently selected DOM Node in the DOM Tree.

«   Previous tip Next tip   »

Sign up to receive a developer tip, in the form of a gif, in your inbox each week