title: d3.js and document.onReady
body: <p>I'm just getting started with <a href="http://mbostock.github.com/d3/" rel="noreferrer">d3.js</a> and there is one detail which is completely eluding me: how do I have my code execute only after the DOM is ready to receive input?</p>
  
  <p>I could, of course, use something like jQuery but that seems excessive.</p>
  
  <p>In <a href="https://github.com/mbostock/d3/tree/master/examples" rel="noreferrer">every d3.js example</a> I've encountered there seems to be no special <code>document.onReady()</code> type of routine, yet all the examples work flawlessly. When testing code on my end, however, the code totally fails if executed before the DOM is ready (throwing my code into a <code>window.onload</code> confirms this).</p>
  
  <p>What gives?</p>