Skip to content

Instantly share code, notes, and snippets.

@CarlMungazi
Created November 18, 2019 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CarlMungazi/a2138fc2a3d96cd6df5bba74f0c63bec to your computer and use it in GitHub Desktop.
Save CarlMungazi/a2138fc2a3d96cd6df5bba74f0c63bec to your computer and use it in GitHub Desktop.
Object.defineProperty(Object.prototype, "onsubmit", {
get() {
return (e) => {
e.preventDefault();
console.log('I am on the setter');
}
},
set(val) {
console.log(val);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment