var output = (function ( object ) { "use strict"; function getProperties ( object ) { return object ? Object.getOwnPropertyNames( object ) .concat( getProperties( Object.getPrototypeOf( object ) ) ) : [] ; } function getUnique ( array ) { return array.filter(function ( value, index ) { return array.lastIndexOf( value ) === index; }); } return getUnique( getProperties( object ).sort() ); }( window )); /* Choose how you'd like it output */ document.body.style.whiteSpace = "pre"; document.body.textContent = JSON.stringify( output, null, "\t" );