<p>I would like to listen to method calls.</p>

<p>For example, when an element is appended by anything to the document, I would like to be passed that element to act on it, like:</p>

<p>//somewhere</p>

<pre><code>aParent.appendChild(aChild);
</code></pre>

<p>//when the former, a function I defined as listener is called with the <code>aChild</code> as argument</p>

<p>Does anybody know how to do that?</p>

don't know if that's possible with the core functions, but you could always create your own functions, for the actions you want to monitor:
```
```
function AppendChild(oParent, oChild) {

   // your stuff on oParent

   // append oChild
   oParent.appendChild(oChild)
}
```
```
or, maybe, modify the actual appendChild(), but that would be tricky...