Var capture=$(" # capture "). The get (0);//will jq object into a dom object
Html2canvas (capture). Then (canvas=& gt; {
Var canvas=document. The body. The appendChild (canvas)
Var canvaswidth=canvas. Width;
Var canvasheight=canvas. Height;
The console. The log (canvaswidth)
The console. The log (canvasheight)
Var img=Canvas2Image. ConvertToImage (canvas, canvaswidth canvasheight);
})