Showing the rendered source

When working with highly dynamic websites, one problem is the view-source doesn’t show the dynamic content that was generated. What you want is a snapshot of the DOM at the time.

I decided to whip one up into my AJAX debugging framework after which Joseph suggested that it be a bookmarklet instead.

rendered source

Here is the source code:

It still has a bug in that it is rendering the HTML when I passed in text/plain. Here is an alternate:

The problem with that is certain tags are filtered out in the <plaintext> rendering. (You can view source it).

Also, I use the innerHTML since I don’t think Mozilla has an outerHTML property.

Not sure what to do.

One thought on “Showing the rendered source

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>