I'm working with some widgets from dhtmlx.com, and have a need to be notified after the completion of a function call that is internal to the widget. Normally this isn't a problem, but I don't understand how to get my hook into it.

The function is defined like this:


   // some object declarations as such:
   var save_sel = {
      row: this.getSelectedRowId(),
      col: this.getSelectedCellIndex()

   // then ...
   function targetFunction() {
So now I want to override dhtmlXGridObject.prototype.toPDF, but only the targetFunction portion of it. I know how to override the whole thing, but how can I get just the targetFunction object? dhtmlXGridObject.prototype.toPDF.targetFunction?