title: JavaScript - Get calling object
body: <blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="https://stackoverflow.com/questions/280389/javascript-how-do-you-find-the-caller-function">Javascript how do you find the caller function?</a></p>
  </blockquote>
  
  <p>Is there a way to get the value of <code>this</code> from the function which has called the current function?</p>
  <p>Look at this:</p>
  <pre><code>function TraceMySelf(){
      console.log(this);
  }
  function A(){
      TraceMySelf();
      console.log(this);
  }
  
  var a = new A();
  </code></pre>
  <p>When this code is executed, the console displays first the <code>window</code> object and then the <code>a</code> object. How can I make the code display the <code>a</code> object twice, with only changing line 2? I know that I could apply the function inside <code>A</code> with <code>this</code>, but that isn't what I want.</p>
  <p>Is this possible?</p>