I am thinking of building a firefox extension. This extension requires the ability of performing screen shots. Is it possible doing so only using javascript?
-------------Problems Reply------------
If you mean a screenshot of firefox's window, yes, and it's so easy it hurts. You have to render it into a canvas. See https://developer.mozilla.org/en/drawing_graphics_with_canvas#Rendering_Web_Content_Into_A_Canvas
<canvas id='my-canvas'></canvas>
<script>
var canvas = document.getElementById('my-canvas');
var ctx = canvas.getContext("2d");
// Draw the window at the top left of canvas, width=100, height=200, white background
ctx.drawWindow(window, 0,0, 100, 200, "rgb(255,255,255)");
// Open another window with the thumbnail as an image
open(canvas.toDataURL("image/png"));
</script>
If you mean a screenshot of the entire desktop, I don't think so