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

This site uses Akismet to reduce spam. Learn how your comment data is processed.