title: In javascript, execute a function when the first function is ready
body: <p>Is there any way, in javascript, to call on a other function when the first function is "ready" </p>
  
  <p>something like this:</p>
  
  <pre><code>ridiculousTimeConsumingFunction().onReady( newFunction() );
  </code></pre>
  
  <p>To illustrate my example you can take a look her:
  <a href="http://web.cinaird.se/pdf/test.htm" rel="nofollow noreferrer">http://web.cinaird.se/pdf/test.htm</a></p>