title: How to get event.target as an object in Angular 2?
body: <p>First, I'm sorry to my deficient english.</p>
  <p>.</p>
  <p>I want write code if click anywhere except <code>.do-not-click-here</code>, call <code>myFunction()</code>.</p>
  <p>So I wrote code like below.</p>
  <pre><code>document.addEventListener('click', (event) =&gt; {
    if(event.target.classList.includes('do-not-click-here')) {
      myFunction();
    }
  )
  </code></pre>
  <p>But this code return error &quot;Property 'classList' does not exist on type 'EventTarget'.&quot;</p>
  <p>.</p>
  <p>So I tried debugging through <code>console.log</code>.</p>
  <p>.</p>
  <p>When I tried <code>console.log(event);</code></p>
  <p><img src="https://i.stack.imgur.com/k8kXF.png" alt="" /></p>
  <p>received <code>event.target</code> as a javascript object. (I want it)</p>
  <p>.</p>
  <p>When I tried <code>console.log(event.target);</code></p>
  <p><img src="https://i.stack.imgur.com/mpcjU.png" alt="" /></p>
  <p>received <code>event.target</code> as an element(?). so <code>event.target.classList</code> is not working. (Maybe)</p>
  <p>.</p>
  <p>How to get <code>event.target.classList</code>?</p>
  <p>or is there a better way than I thought for I wanted?</p>