title: How to detect when innerHTML is complete
body: <p>I've done quite a bit of searching for a solution to this problem but so far haven't found one that works cross browser.</p>
  
  <p>What I need is a raw javascript function which will take an element and run a callback once the innerHTML has successfully been inserted into the dom.</p>
  
  <p>e.g.</p>
  
  <pre><code>    var element = document.getElementById('example');
          element.innerHTML = newhtml;
  
      waitUntilReady(element, function(){
              //do stuff here...
      });
  </code></pre>
  
  <p>So just to summarize, I need to be able to check the contents of the element and fire a callback when innerHTML has completed.</p>
  
  <p>Thanks in advance for any help.</p>