I am using html2canvas to convert a div on a canvas. Like this:
This is the html2canvas bug report.
I was able to fix the Uncaught Error: IndexSizeError: DOM Exception 1 by patching the html2canvas.js file.
replace this:
ctx.drawImage(canvas, bounds.left, bounds.top, bounds.width, bounds.height, 0, 0, bounds.width, bounds.height);
by this:
var imgData = canvas.getContext("2d").getImageData(bounds.left, bounds.top, bounds.width, bounds.height);
ctx.putImageData(imgData, 0, 0);