title: set/getAttribute comparisons only work with strings?
body: <p>I would like to set a <code>span</code> node's <code>visited</code> attribute to <code>true</code> or <code>false</code> based on if it has been visited.</p>
  
  <pre><code>test();
  
  function test () {
  
      var el = document.createElement("span");
      el.setAttribute("visited", false);
  
      el.setAttribute("visited", true);
  
      alert(el.getAttribute("visited") === true); //False
      alert(el.getAttribute("visited") === "true"); //True
  
  }
  </code></pre>
  
  <p>I initially set the attribute "visited" to boolean <em>false</em>, then set the boolean to <em>true</em>. I noticed that when I checked if the attribute was <code>true</code>, it returned false, but if I checked the string <code>true</code>, it returned true. </p>
  
  <p>The <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute" rel="nofollow">MSN Docs</a> only talk about the attributeName as needing to be string, not the value. So why doesn't comparing against bools work?</p>
  
  <p><a href="https://jsfiddle.net/g1nad5L0/" rel="nofollow">FIDDLE</a></p>