On 19/04/2016 14:41, Jip de Beer wrote:
I followed your steps exactly and uses this code to add a canvas on a page with
jQuery:
var myCanvas = document.createElement('canvas');
var width = $(document).width()
myCanvas.width = width;
var height = $(document).height()
myCanvas.height = height;
var ctx = myCanvas.getContext("2d");
ctx.drawWindow(window, 0, 0, width, height, "rgba(0, 0, 0, 0)");
console.log(myCanvas.toDataURL());
Result:
TypeError: ctx.drawWindow is not a function
I'm currently trying to figure out how to make Firefox render the entire page
the whole time.
drawWindow is a privileged API and you would need to use an add-on or
Firefox code to call it:
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawWindow
~ Gijs
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform