Created
May 18, 2021 16:52
-
-
Save gnbaron/45bc0ca5a11f47db722fa815797f3b23 to your computer and use it in GitHub Desktop.
Check attributes added to window object.
This file contains hidden or 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
function getAttrs() { | |
const iframe = document.createElement('iframe') | |
document.body.appendChild(iframe) | |
return Object.entries(window) | |
.filter(([k]) => !(k in iframe.contentWindow)) | |
.reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment