I guess this is an odd one, and the answer is most likely it is not possible since it would represent a security breach; but I am looking for a way - if any - to get a screendump of content inside the browser. I don't need the entire window, but actually just need to dump the rendered state of an tag. It need to be cross platform and cross browser compatible.
+2
A:
Unfortunately, it cannot be done with JavaScript, because it doesn't handle binary streams.
As a side-note, if your goal is to make rendering tests, you could try instantiating the target browsers within a hosted environment (i.e. host Internet Explorer in a WinForms application and get a screenshot of the rendered content) - this will show the Silverlight plug-in and allow taking screenshots.
Alexander Gyoshev
2008-10-08 07:32:07
A:
Too bad. I am trying to this indirectly from a Silverlight application and use the resulting screencapture inside Silverlight.
Thanks for the help.
EinarI
2008-10-08 07:46:29
yup. just imagine silverlight ads taking screenshots of user info page to steal it ;) nasty, nasty...
Alexander Gyoshev
2008-10-08 10:57:11
A:
If you don't need an actual screen shot, you can grab the innerHTML of your content and send it back to the server via Ajax, stash it somewhere and view it remotely.
Diodeus
2008-10-08 15:30:15