title: IE form input element not being dynamically added to Window object per HTML5 specs
body: <p>According to the HTML specs (<a href="http://www.w3.org/TR/html5/browsers.html#named-access-on-the-window-object" rel="nofollow">http://www.w3.org/TR/html5/browsers.html#named-access-on-the-window-object</a>), the window object is supposed to dynamically contain the elements from the page that are "named".  In my case, an input element that has an id attribute associated with it should exist on the Window object.</p>
  
  <p>However, according to the HTML below (which passes HTML5 validation), IE doesn't recognize an input element by it's id on the window object if it's underneath a form element.</p>
  
  <p>The following HTML will show an alert of "object" and then an alert of "undefined" in IE8 and IE10.  Why?  In FireFox and Google Chrome it shows both alerts of "object".  Is there something I'm missing?</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;HTML5 Standards mode&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;input type="button" id="outerbutton" value="outer button"&gt;
          &lt;form&gt;
              &lt;input type="button" id="innerbutton" value="inner button"&gt;
          &lt;/form&gt;
          &lt;script&gt;
              window.onload = function(e)
              {
                  alert(typeof outerbutton);
                  alert(typeof innerbutton);
              };
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>