Sunday, October 30, 2011

[js] Forwarding arguments

If you want to call another function with all arguments supplied to this function, use the function's apply method:

pop:function() {
  this.onpop.apply(this, arguments);
  // stuff
}

No comments: