Created
March 15, 2023 15:00
-
-
Save doodlemoonch/8b8c8cb40c9aa28b19b8341fcb1f2958 to your computer and use it in GitHub Desktop.
Debug when cookies are set
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
origDescriptor = Object.getOwnPropertyDescriptor(Document.prototype, 'cookie'); | |
Object.defineProperty(document, 'cookie', { | |
get() { | |
return origDescriptor.get.call(this); | |
}, | |
set(value) { | |
debugger; | |
return origDescriptor.set.call(this, value); | |
}, | |
enumerable: true, | |
configurable: true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment