SO Answer

url: http://stackoverflow.com/a/9895410/276250 prettyprint window, screen & document

by secretgspot

HTML

<script src="https://raw.github.com/padolsey/prettyPrint.js/master/prettyprint.js"></script>
<div id="screen"><h1>screen</h1></div>
<div id="document"></div><h1>document</h1>
<div id="window"><h1>window</h1></div>

JavaScript

$('#window').append(prettyPrint(window));
$('#screen').append(prettyPrint(screen));
$('#document').append(prettyPrint(document));