This should subscribe function "handler" on scroll events from every iframe on the page
var iframes = document.getElementsByTagName("iframe");
for (i = 0; i < 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
}
... 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
UPD iframe content and page are from the same domain