contents   index   previous   next



The call function is called whenever an object method is called. Whatever parameters are passed to the original function will be passed to the call() function.


The following example creates an Annoying object that beeps whenever it retrieves the value of a property.


function myget(prop)



   return this[property];



var Annoying = new Object;


Annoying.get = myget;


Note that the System.beep() method is used only for this example and must be explicitly created for actual use.