title: Delay eventListener
body: <p>In JavaScript, I have an element (which is an input tag).</p>
  
  <p>This code :</p>
  
  <pre><code>element.addEventListener("focus", function () {
      this.parentNode.parentNode.style.outline = this.parentNode.parentNode.dataset.ans_outline;
  });
  </code></pre>
  
  <p>When the input is focused, outline is changed immediately.</p>
  
  <p>My question is : how could I delay this event ?</p>
  
  <p>I've tried :</p>
  
  <pre><code>element.addEventListener("focus", function () {
      setTimeout(function(node) {
          node.parentNode.parentNode.style.outline = node.parentNode.parentNode.dataset.ans_outline;
      }(this), 1000)
  });
  </code></pre>
  
  <p>.. But it doesn't work :(</p>