1 year ago

#92860

test-img

mahshid motie

empty screen shot of a div including canvas using html2canvas

I am using html to canvas library to make a screen shot of a div which includes a canvas as the first children node and it returns a white space. The div is holding a panorama image using Panolens library.

html2canvas(document.querySelector("#hey")).then(canvas => {...})

Then I tried to set preserveDrawingBuffer of the canvas to true and I still get the same result.

 const gl = document.querySelector("#hey").children[0].getContext('webgl2', {preserveDrawingBuffer: true});
                    html2canvas(document.querySelector("#hey")).then(canvas => {..})

Does anyone have experience?

javascript

node.js

webgl

html2canvas

panoramas

0 Answers

Your Answer

Accepted video resources