title: Catching events from Iframe in Firefox
body: <p>This should subscribe function "handler" on scroll events from every iframe on the page</p>
  
  <pre><code>var iframes = document.getElementsByTagName("iframe");
  for (i = 0; i &lt; iframes.length; i++) {
    var current = getRealObject(iframes[i])
    current.contentDocument.addEventListener('DOMMouseScroll', handler, false)      
  }
  
  function getRealObject(object) {  // unwraps the object if necessary
    return (object.wrappedJSObject) ? object.wrappedJSObject : object
  }
  </code></pre>
  
  <p>... but on some pages it doesnt. Furthermore, in those cases anything in contentDocument is inaccessible, and without unwrapping contentDocument is null. Using FF 3.5</p>
  
  <p>UPD iframe content and page are from the same domain</p>