title: Why do we write window.?
body: <p>While adding some initialisation code to a webpage, I found myself writing <code>window.onload = ...</code> for the umptieth time, when a thought hit me.</p>
  
  <p>The <code>window.</code> isn't necessary, because <code>window</code> is the current object. So it's optional!<br>
  But nobody writes just <code>onload = ...</code> and I wonder why that is.</p>
  
  <p>I mean, we have no qualms about writing other things, say <code>alert</code> without the <code>window.</code> qualifier.</p>
  
  <pre class="lang-javascript prettyprint-override"><code>window.onload = function() {
    alert('Your window has loaded');
  };
  </code></pre>
  
  <p>while in reality, <code>alert</code> is just as much a method of the <code>window</code> object as the <code>onload</code> is.<br>
  So, why the difference? Why do even formal websites like the <a href="http://dev.w3.org/SVG/tools/svgweb/docs/UserManual.html">W3C</a> do this?</p>