I\'m trying to extend the Array.push method so that using push will trigger a callback method, then perform the normal array function.
I\'m not quite sure how to do
Array.prototype.push was introduced in JavaScript 1.2. It is really as simple as this:
Array.prototype.push = function() { for( var i = 0, l = arguments.length; i < l; i++ ) this[this.length] = arguments[i]; return this.length; };
You could always add something in the front of that.