JS Path

I am going through chrome dev tools docs, there is this "Copy JS Path" that they are telling to copy. I also pasted it in a console which evaluated to an expression. But I dont understand what exactly is a JS Path and why we copy it. I googled but still cant find anything... LINK: https://developer.chrome.com/docs/devtools/dom/#path
Chrome for Developers
Get started with viewing and changing the DOM  |  Chrome DevTools  ...
How to view nodes, search for nodes, edit nodes, reference nodes in the Console, break on node changes, and more.
3 Replies
b1mind
b1mind4mo ago
Honestly its bad naming on their part. All it is doing is exactly what that link states. Its giving you a querySelector('') prefilled with the selector "path". https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
glutonium
glutonium4mo ago
it should instead be named something like "copy css selector" or something
brr
brrOP4mo ago
thanks i get it now it was just confusing calling it "js path" also firefox doesnt have this option, smart it has copy css selector and css path which is all we need
Want results from more Discord servers?
Add your server