I have a page loading at <iframe>.
Inside <iframe>, I have a function that patiently waits for a page to load using the jQuery event $(window).load(), which should wait until ALL the contents of the page (images, javascript, css, etc.) are loaded before firing.
The function then accesses the page, loading <iframe>with postMessageto send the height of the content in <iframe>back.
I tested the functionality in IE7, IE8, Firefox 2, Firefox 3, Opera and Chrome, and everything works fine. When I try to load a page in Safari, the function calls back before the images are loaded ... this way I get the wrong page height.
Does anyone know how to make Safari wait for images to load before calling the function (in this case jQuery solutions are preferred)?
source
share