Chrome DevTools: Copy an element into your clipboard with this keyboard only workflow

Last updated: June 17, 2020
Copy an element into your clipboard with this keyboard only workflow

You can get any element into your clipboard with this keyboard only workflow. In the Console Panel, try this:

copy(document.body)

This also works for JavaScript objects, for example:

copy({
    my: 'object'
})

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