title: What is the vanilla JS equivalent of jQuery's $(document)?
body: <p>I'm trying to figure out the vanilla equivalent of the following code: </p>
  
  <pre><code>$(document).attr('key', 'value');
  </code></pre>
  
  <h3>So far I've looked into</h3>
  
  <ul>
  <li><code>document</code> - it's not an element so you cannot call <code>setAttribute</code> on it</li>
  <li><code>document.documentElement</code> - returns the <code>html</code> tag. This is not the same "element" that jquery is targeting</li>
  <li><code>$(document)[0]</code> seems to return a shadow element in Chrome Inspector</li>
  <li><code>$(document).attr('key', 'somethingUnique')</code> doesn't exist in the Chrome Inspector</li>
  </ul>
  
  <p>Is jQuery creating it's own shadow element mock of the document so it can treat it like a real element? What element is jQuery actually referencing when you do <code>$(document)</code>? </p>