/log-globals

Logs your global variables to the console - Bookmarklet / DevTools snippet

Primary LanguageJavaScriptMIT LicenseMIT

log-globals

Logs your global variables to the console

Useful for finding leaked global variables.

screenshot

Getting started

Can be used as a bookmarklet or a DevTools snippet.

Bookmarklet

javascript:console.log(function(){var a=document.createElement("iframe");a.style.display="none";document.body.appendChild(a);var c=a.contentWindow;document.body.removeChild(a);var a=Object.create(null),b;for(b in window)b in c||(a[b]=window[b]);return a}())

License

MIT © Sindre Sorhus