title: How can I observe changes to the DOM in an iframe?
body: <p>I'm using Jquery-Mutation Summary <a href="https://code.google.com/p/mutation-summary/" rel="nofollow">https://code.google.com/p/mutation-summary/</a> "a JavaScript library that makes observing changes to the DOM fast, easy and safe"</p>
  
  <p>It can be found here: <a href="https://github.com/joelpurra/jquery-mutation-summary" rel="nofollow">https://github.com/joelpurra/jquery-mutation-summary</a></p>
  
  <p>Here's an example of it at work: <a href="http://joelpurra.github.io/jquery-mutation-summary/example/demo.html" rel="nofollow">http://joelpurra.github.io/jquery-mutation-summary/example/demo.html</a></p>
  
  <p>I'd like to be able to observe changes to the DOM in an iframe from a parent window. Here's my code</p>
  
  <pre><code>$(function() {
  var $ChangeThere = $('#myframe') //iframe id myframe
      $ChangeThere.mutationSummary('connect', callback, [{
      all: true
  }]);
  function callback(summaries){
  //something changes in iframe dom
      alert('change!');
  }
  });
  </code></pre>
  
  <p>The above code doesn't work. I'm accessing from the same domain as well.</p>