title: List all properties of window object?
body: <p>I'm looking to (dynamically) obtain a list of HTML elements the browser is currently aware of, such as <code>HTMLPreElement</code>, <code>HTMLSpanElement</code> etc. These objects are global, i.e. </p>
  
  <pre><code>console.log('HTMLPreElement' in window);  //=&gt; true
  </code></pre>
  
  <p>So I thought I'd be able to use <code>getOwnPropertyNames</code> like this:</p>
  
  <pre><code>console.log(Object.getOwnPropertyNames(window));
  </code></pre>
  
  <p>to obtain the full list of global properties (MDN states that this returns both enumerable and non-enumerable properties).</p>
  
  <p>Using the above, I get an array with around 70 property nanes. But, it doesn't include objects like <code>HTMLPreElement</code> - only <code>HTMLElement</code>. I also tried:</p>
  
  <pre><code>console.log(Object.getOwnPropertyNames(window.Window.prototype));
  </code></pre>
  
  <p>which brings back a bigger list (including <code>addEventListener</code> etc) but again, no <code>HTMLPreElement</code>.</p>
  
  <p>So, where the heck do these <code>HTML{Tag}Element</code> objects reside? </p>