Javascript - finding an object's container
<p>If I create an object </p>

<pre><code>var O = { A : {}, B : {}}
</code></pre>

<p>I then set</p>

<pre><code>O.A.foo = function() { }
O.B.foo = function() { }
</code></pre>

<p>How can <code>foo()</code> find out whether its parent is <code>A</code> or <code>B</code>?</p>
