title: Using an object's method as an event handler, how do I remove it?
body: <p>If I register an object's method as an event handler, I can't remove it. Am I missing something obvious, or can't it be done?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function Test() {
      
      document.body.addEventListener( 'click', this.handler.bind( this ), false );
      
  }
  
  Test.prototype.handler = function() {
      document.body.innerHTML += '.';
      document.body.removeEventListener( 'click', this.handler.bind( this ), false );
  };
  
  new Test();</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
      border: 1px solid black;
      width: 100px;
      height: 100px;
      font-size: 30px;
  }</code></pre>
  </div>
  </div>
  </p>