Closed Bug 1265378 Opened 8 years ago Closed 8 years ago

The firefox does not generate 'load' event for an embedded iframe

Categories

(Core :: DOM: Events, defect)

45 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1229707

People

(Reporter: alam17, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36

Steps to reproduce:

Have a script:

 <script type="text/javascript">
               var parentIframe = document.createElement('iframe');

               parentIframe.addEventListener('load', function () {
                   alert('parent loaded');
               });

               window.setTimeout(function () {
                   var childIframe = parentIframe.contentDocument.createElement('iframe');

                   childIframe.addEventListener('load', function () {
                       alert('child loaded');
                   });

                   parentIframe.contentDocument.body.appendChild(childIframe);
               });

               document.body.appendChild(parentIframe);
           </script> 


Actual results:

You receive only one message - "parent loaded"



Expected results:

Both messages should appear - "parent loaded", "child loaded".
As in all other browsers.
Could you attach a testcase to the bug report, please. (html file)
Flags: needinfo?(alam17)
Component: Untriaged → DOM: Events
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(alam17)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.