title: Enable dispatchEvent function in my custom class
body: <pre><code>class Model {
      constructor( initObj ){
          this.eventer = new EventTarget();
          this.dispatchEvent = this.eventer.dispatchEvent
  
      }
      run(){
          // works
          this.eventer.dispatchEvent( new CustomEvent('sessionEvent', { detail:1 } ) )
  
          // Uncaught (in promise) TypeError: Illegal invocation
          this.dispatchEvent( new CustomEvent('sessionEvent', { detail:1 } ) )
      }
  
  }
  </code></pre>
  <p>OR</p>
  <p>What is the best way to enable dispatchEvent functionality in my class?  Ideally to use it like so:</p>
  <pre><code>model.addEventListener('someEvent' , onSomeEvent )
  </code></pre>