Bug 13118

Summary: Safari does not load page in iframe if the frame display is none
Product: WebKit Reporter: Scott Wickham <scottus>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Critical    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac (PowerPC)   
OS: All   
URL: http://www.scottwickham.com/nyl/tabs/tab7.html
See Also: https://bugs.webkit.org/show_bug.cgi?id=6926

Description Scott Wickham 2007-03-19 09:04:40 PDT
I used both innerHTMl and DOM methods to add an iframe to my page.

document.getElementById('loadiframe').innerHTML  ='<iframe  id="frame1"  src="frame.html"  style="display:none"></iframe>';

If the display was equal to none. Safari refused to load frame.html. Just because it is not displayed doesn't mean it shouldn't be loaded and a full member of the DOM.  

In my specific example frame.html would be loaded and the script in the frame.html would be executed which would then modify the main page. Safari never executes the script, nore does it report a javascript error. It just totally ignores the page unless display is not equal to none.
Comment 1 Geoffrey Garen 2007-03-27 14:19:59 PDT
Works for me with the latest nightly build (available @ nightly.webkit.org). I remember that Anders Carlsson fixed this issue a while back, but I didn't track down the bug #.