ClassName.prototype.methodName = function() {
console.log('This is the original method');
};
var oldMethod = ClassName.prototype.methodName;
ClassName.prototype.methodName = function() {
//Calls the old method.
oldMethod.call(this);
console.log('This is the replaced method');
};