Get entire text of document as a string using javascript

Posted by Tom Dignan on Stack Overflow See other posts from Stack Overflow or by Tom Dignan
Published on 2010-04-02T07:51:11Z Indexed on 2010/04/02 7:53 UTC
Read the original article Hit count: 273

Filed under:
|
|

I am developing a firefox extension and ideally would be able to get the whole darn DOM as a string.. forget any data structure. I just want what I see in "view source" in a buffer. I have been checking out javascript references and HTMLDocument etc. with no avail.

Ideally I would be able to write to this buffer as well (seems possible i.e. document.writeLn()) I wish there was a document.read()? Am I just a js noob?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about dom