What's New In DevTools (Chrome 72)
Note: We'll publish the video version of this page in early February 2019.
New features and major changes coming to Chrome DevTools in Chrome 72 include:
- Visualize performance metrics in the Performance panel.
- Highlight text nodes in the DOM Tree.
- Copy the JS path to a DOM node from the DOM Tree.
- Audits panel updates, including a new audit that detects JS libraries and new keywords for accessing the Audits panel from the Command Menu.
Video version of these release notes #
Visualize performance metrics #
Figure 1. First Meaningful Paint in the Timing section
Highlight text nodes #
When you hover over a text node in the DOM Tree, DevTools now highlights that text node in the viewport.
Figure 2. Highlighting a text node
Copy JS path #
Suppose you're writing an automation test that involves clicking a node (using Puppeteer's
page.click() function, perhaps) and you want to quickly get a reference to that DOM node. The usual workflow is to go to the Elements panel, right-click the node in the DOM Tree, select Copy > Copy selector, and then pass that CSS selector to
document.querySelector(). But if the node is in a Shadow DOM this approach doesn't work because the selector yields a path from within the shadow tree.
To quickly get a reference to a DOM node, right-click the DOM node and select Copy > Copy JS path. DevTools copies to your clipboard a
document.querySelector() expression that points to the node. As mentioned above, this is particularly helpful when working with Shadow DOM, but you can use it for any DOM node.
Figure 3. Copy JS path
DevTools copies an expression like the one below to your clipboard:
Audits panel updates #
Also, you can now access the Audits panel from the Command Menu by typing
Figure 5. Typing
lighthouse into the Command Menu