Thanks for the pointers. 

I've decided to try the basics first, rendering the whole window to the canvas. 
Unfortunately, the result, as of yet, is an empty canvas with a white 
background.

Anything I'm missing here?


<?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

Reply via email to