title: Get id of clicked element inside a div with typescript
body: <p>I have a page with a menu. That menu is surrounded by a div id="tools". I pass the tools div to an EventHandler. That Evenyhandler should figure on which entry in the menu the user clicked that the program can continue due to the userchoice.</p>
  
  <p>In JQuery I would do something like this</p>
  
  <pre><code>  $(document).click(function (event) {
          var text = $(event.target).text();
          if (text.contains("line")) {
              //DO
          } else if (text.contains("square")) {
              //DO
          }
      });
  </code></pre>
  
  <p>If I use event.target in typescript I have no option to extract the content.</p>
  
  <p>It can be displayed with console.log(event.target) but thats it.</p>
  
  <p>So how can I please get the content of the target?</p>
  
  <pre><code>&lt;div&gt;
      &lt;div id="tools" style="position: fixed; top: 200px; left: 800px"&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a id="line"&gt;Line&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a id="circle"&gt;Circle&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a id="triangle"&gt;Triangle&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a id="square"&gt;Square&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>TS</p>
  
  <pre><code> menu.addEventListener("click", function (event) {
          //relevant part for my question
      });
  </code></pre>