Refering to the container object inside event functions
<p>I have code like this</p>

<pre><code>var MyObj = {

    f1 : function(o){ o.onmousedown = MyObj.f2;},
    f2 : function(){ MyObj.f1(); }
}
</code></pre>

<p>I would like to know how to refer to MyObj without hardcoding it (i.e. this), so I can change object name without changing the code.</p>

<p>I am interested only in litteral object notation.</p>

<p><strong>EDIT</strong>: </p>

<p>I didn't get it right. One of the functions was actually onmousedown event, so <em>this</em> wasn't working in it... This will refer to the object that rised event. I wonder is it still possible to refer to MyObj in such case.</p>
