«   Previous tip Next tip   »

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

Last updated: 17th June 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'
})
«   Previous tip Next tip   »

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