/dev tips

(182) Automatically convert Promise.then() into async/await Paint Timing Markers (184)

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

14th November 2018
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.

Note: The Store as global variable option for DOM Nodes is currently in Canary and should land in stable soon.

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