title: JavaScript how to get if a button is active (after click)
body: <p>I have only one button. In css you can use <em>button:active { do stuff }</em> and it will become valid once and after the button is clicked, so interacting with other objects (clicking on a image) will cause
  the statement to be null. How Can I translate this into java script?
  Something like that:</p>
  <pre><code>const Ham_Button = document.querySelector('button');
  
  while (Ham_Button.isActive)
  {
     do stuff
  }
  
  </code></pre>
  <p>I tried this:</p>
  <pre><code>const Ham_Button = document.querySelector('button');
  
  const ClickEvent = function() {
      Hidden_Nav.style.display = &quot;block&quot;;
  }
  
  Ham_Button.addEventListener(&quot;click&quot;, ClickEvent);
  
  </code></pre>
  <p>But the event is triggered only and only when I click, not after, when the element is still the last interacted object.</p>