I'm not sure what exactly I'm doing wrong but neither drawWindow, nor asyncDrawXULElement seem to work for me. Not even for screenshots of the whole window.
"Borrowing" from capture.js/screenshot.js also made me none the wiser. Is there something wrong with how I'm trying to copy the contents of the window to the canvas? <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" id="window"> <button>Test</button> <html:canvas id="canvas" width="1024" height="768"> </html:canvas> <script> var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); ctx.drawWindow(window, 0, 0, 1024, 768, "rgba(255,255,255,1)"); </script> </window> _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform