[Sugar-devel] Preview field in web activities

Manuel Quiñones manuq at laptop.org
Mon Sep 9 07:29:10 EDT 2013

2013/9/9 Suraj K S <suraj.gillespie at gmail.com>:
> I'm able to capture the screen shot of the activity using
> http://html2canvas.hertzen.com/
> It captures the screenshot and returns a canvas.
> Now to convert it to a png image I'm using:
> var previewImage = canvas.toDataURL("image/png;base64");

I'm using canvas.toDataURL() in Paint Web:


Can you check if you have the problem there?

> The problem with this is that it throws a
> SECURITY_ERR: DOM Exception 18
> After reading a bit on this error, got to know that when the canvas has an
> element whose origin-clean flag is set to false, it would generate this
> error.
> Not able to understand why exactly this is happening in Sugar though.
> Is there a way around this?

.. manuq ..

More information about the Sugar-devel mailing list