DevTools Tips

Categories: Supported by:

Copy an object from the console

The console panel supports a very handy copy() function that stringifies and copies anything you pass to it as an argument, so you can then paste it somewhere else.

For example: copy($$('a').map(a => a.href).join('\n')) copies all of the links from the page.

Screenshot of Chrome devtools' console with a line of code using the copy() function