SO Answer

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

by Joel Kirchartz

HTML

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

JavaScript

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