I found this kind of syntax in Javascript :
myVariable = myClass.prototype.simpleMethod;
myClass.prototype.simpleMethod = function(params)
{
myVariable.apply(this, arguments);
....
};
What's the purpose of this pattern? Does the new function combine old and new implementation? Or replace it within '....'? Can you provide a detailed explanation of this?
EDIT: Problem solved. I marked the Nas answer as accepted but the spender one could be relevant as well.