I have a scenario that, I am creating dynamic html content and I need to export/save the html content to an image file with php, jQuery and JavaScript [or with any other if
I put the canvas myself and did not use createElement line above
You probably need to add this line before drawWindow() to get security permissions from user. See http://murfy.de/read/webgl-drawWindow
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
If you want to save the image as PNG etc, I found a useful script at: http://www.nihilogic.dk/labs/canvas2image/