title: Using .tagName correctly
body: <pre><code>if (((document.activeElement).parentNode).tagName == "div") { 
     //do amazing things 
  }
  </code></pre>
  
  <p>For some reason a specific function of mine isn't working, and I think it has to do with the line above.  Is the line above syntactically correct, or is wrong?  If the line above is correct, I'll either delete the question (because then the question is useless) or add additional information of the rest of the function.</p>
  
  <p>Thanks</p>