[Sugar-devel] Preview field in web activities

Daniel Narvaez dwnarvaez at gmail.com
Mon Sep 9 07:38:12 EDT 2013


I wonder about the general approach here... It's good that it can be done
all in js, but rerendering the DOM like this feels a bit bad. It will
probably not work well for some web sites and might have a performance hit.
We have access to the webkit rendered so maybe we should just use that...
If we decide or the js approach, we should at least test it pretty well to
make sure it's good enough.

On Monday, 9 September 2013, Suraj K S wrote:

> 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("ImageWriter/png;base64");
>
> 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?
>


-- 
Daniel Narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130909/b6df949f/attachment-0001.html>


More information about the Sugar-devel mailing list