Created
February 17, 2021 11:58
-
-
Save danieltxok/3329773d2a14c58e7026af60c05a311d to your computer and use it in GitHub Desktop.
Deletes previous page load
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
javascript: | |
document.documentElement.innerHTML = ''; | |
for (const obj of [document, window]) { | |
for (const event of Object.values(getEventListeners(obj))) { | |
for (const {type, listener, useCapture} of event) { | |
obj.removeEventListener(type, listener, useCapture) | |
} | |
} | |
} | |
console. clear(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment