On 20 October 2011 05:34, Rolf Wendolsky <[email protected]> wrote: > For a planned project, I would like to know whether it is possible to convert > DOM back to HTML
This is rather easy in pure JS. All you have to do is to remove all elements you don't want/need (such as <script>) and then use `document.documentElement.innerHTML` or something similar. If you wanted to do this on a larger scale, you could use/embed XulRunner in some way and run a similar piece of JS from that. You might also be able to hook directly into the engine to the same effect with possibly better performance. Note that scripts on the page might be designed to be used by the user, not ran all at once on load, so the page would be non-functional through your process. On another note, I think what you are proposing is already implemented in a way by Opera for their mobile/embedded browser. -- Félix _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

