Reputation: 62773
It would be useful to link to a specific element in the Chrome Inspector > Elements tab. For example, given a page with the following HTML:
<div>
<div id="box">A box element</div>
</div>
Is it possible to create a link to the #id
element within the Chrome Inspector > Elements tab.
In other words, is it possible to create a link to a URL, open the Chrome Inspector and have the #box
element automatically selected?
This could be done using the element's XPath, if there were some way to open Chrome Dev Tools via the URL, similar to view-source:URL
.
Upvotes: 3
Views: 2226
Reputation: 177574
You can right click on an element and choose either "Copy selector" or "Copy XPath". Pressing Cmd-F in the Elements panel will bring up a search bar with "Find by string, selector, or XPath", so you could use this to point someone to a specific element on a particular page.
Upvotes: 5