Get notification when javascript object is invoked
<p>Is it possible to get notification from within JavaScript when calling an object's methods?</p>

<p>Example:</p>

<pre><code>o.foo(arg1);

function o_ongenericcall(name, arguements)
{
 switch (name)
 {
  case "foo":
   // Do something 
   break;
 }
}
</code></pre>

<p>In the above example, o is the object and I would like o_ongenericcall to be raised when any method is trying to be invoked.</p>
