Last active
January 4, 2016 21:29
-
-
Save wsagen/8681782 to your computer and use it in GitHub Desktop.
Override prototype javascript object or function
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
| Packaging.prototype.sendCreateLabelRequest = Packaging.prototype.sendCreateLabelRequest.wrap(function(parentMethod){ | |
| //replace the original method here with your own stuff | |
| console.log('we have overridden their function'); | |
| parentMethod(); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment