Created
February 10, 2023 07:51
-
-
Save mkckr0/b0d81a13bb4143ad3f5432dc07525376 to your computer and use it in GitHub Desktop.
List all properties of window object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
let iframe = document.createElement('iframe') | |
iframe.style.display = 'none' | |
document.body.appendChild(iframe) | |
let results = {} | |
for (k of Object.getOwnPropertyNames(window)) { | |
if (iframe.contentWindow.hasOwnProperty(k)) { | |
continue | |
} | |
if (typeof(window[k]) === 'function') { | |
continue | |
} | |
results[k] = window[k] | |
} | |
document.body.removeChild(iframe) | |
return results | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment