title: JavaScript setInterval and `this` solution
body: <p>I need to access <code>this</code> from my <code>setInterval</code> handler</p>
  <pre><code>prefs: null,
  startup : function()
      {
          // init prefs
          ...
          this.retrieve_rate();
          this.intervalID = setInterval(this.retrieve_rate, this.INTERVAL);
      },
  
  retrieve_rate : function()
      {
          var ajax = null;
          ajax = new XMLHttpRequest();
          ajax.open('GET', 'http://xyz.example', true);
          ajax.onload = function()
          {
              // access prefs here
          }
      }
  </code></pre>
  <p>How can I access <code>this.prefs</code> in <code>ajax.onload</code>?</p>