Skip to content

Instantly share code, notes, and snippets.

@shahabkhalvati
Created September 30, 2018 10:02
Show Gist options
  • Save shahabkhalvati/ddda31bb615bc081802209dfbc38fa0e to your computer and use it in GitHub Desktop.
Save shahabkhalvati/ddda31bb615bc081802209dfbc38fa0e to your computer and use it in GitHub Desktop.
client side screen shot of port view
// load screenshot tool dynamically
var script = document.createElement('script')
script.src = 'https://html2canvas.hertzen.com/dist/html2canvas.min.js'
document.head.appendChild(script)
// take screenshot
html2canvas(document.querySelector("body")).then(canvas => {
document.body.appendChild(canvas)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment