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.

About tychay

light writing, word loving, ❤ coding
This entry was posted in web development. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.