title: JavaScript setInterval scope issue: an alternative to bind
body: <p>I just correct a scope problem in my JavaScript Class with bind method that put the function called by setInterval in the right scope. But it seams bind has come early (1.8.4 I think) and I'm worry with browser compatibility.</p>
  
  <p>Is there another older alternative? Should I forget about old browsers?</p>
  
  <p>Example:</p>
  
  <pre><code>function MyClass(SomeText){
    this.text = SomeText;
  }
  
  MyClass.prototype.test = function(){
    console.log("The text: "+this.text);
  }
  
  MyClass.prototype.initialize = function(){
    setInterval(this.test.bind(this), 1000);
  }
  
  var Test = new MyClass("my thoughts");
  Test.initialize();
  </code></pre>