Pass object as a function parameter
<p><strong>Basis</strong></p>

<ul>
<li>A <code>toplevelOBJ</code> object is used throughout the application as <code>this.toplevelOBJ</code>, where I have access to it's properties, such as, e.g. <code>this.toplevelOBJ.mapArea.coordX</code>.</li>
<li>In <code>ClassB</code> there is a function called <code>blink</code> which waits for signal from an outside source.</li>
<li>In <code>ClassC</code> I need to capture this signal, so I set up a function, <code>capture</code> in <code>ClassC</code> to retrieve the signal sent by <code>ClassB</code></li>
</ul>

<p><strong>Problem</strong></p>

<p>When sent through the <code>capture()</code> function to <code>ClassC</code>,
<code>"this"</code> in <code>this.toplevelOBJ</code> no longer refers to the <code>toplevelOBJ</code>, but <code>ClassC</code>.</p>

<p>Because of this, I sent <code>this.toplevelOBJ</code> as parameter <code>toplevel</code> through the <code>capture()</code> function, but on receiving, I am not sure If a function from the <code>toplevelOBJ</code> is being called: <code>toplevel.update()</code>, whereas I can access its properties: <code>toplevel.mapArea.coordX</code></p>

<p><strong>QUESTION</strong></p>

<p>When sending through an <code>Object</code> as a parameter, is the <code>Object</code> exactly the same? because when I inspected the <code>Object</code>, I found the <code>update()</code> function under <code>toplevel.__proto__.__proto__</code>, whereas, I found its properties straight away: <code>toplevel.mapArea</code></p>

<hr>

<p><strong>Code</strong></p>

<pre><code>// Class in which I am sending the object
var ClassB = exports.ClassB = ClassA.extend({
    blink: function(key, value) {
       ClassC.prototype.capture(key, value, this.toplevelOBJ);
    }
});
</code></pre>

<hr>

<pre><code>// Class in which I am receiving the object
var ClassC = exports.ClassC = ClassA.extend({
    capture: function(key, value, toplevel) {
        /* Run Function of toplevel */
    }
});
</code></pre>
