title: Javascript: How to extend dom property while keeping original reference?
body: <p>I am trying to change a property like Element.scrollTop. I would like to return a number that is a modification of the original number</p>
  
  <pre><code>var descriptorWithChanges =
  {
      get: function () {
          alert("scrollTop accessor " + this.scrollTop);
          var originalScrollTop = this.scrollTop
          return (originalScrollTop - 10);
      }
  };
  Object.defineProperty(Element.prototype, "scrollTop", descriptorWithChanges);
  </code></pre>
  
  <p>The problem is that i get error: too much recursion. What is the correct way of storing reference to originalScrollTop ?</p>