Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Getter / Setter for Javascript function prototype
p.__defineGetter__("test", function() {
return "testing testing";
});
p.__defineSetter__("test", function() {
// DO SOMETHING
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment