Closed Bug 288359 Opened 20 years ago Closed 20 years ago

Iframe onload event triggers the onload event on the parent window.

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

VERIFIED DUPLICATE of bug 196057

People

(Reporter: kywocs, Assigned: bugzilla)

References

()

Details

(Keywords: testcase)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

In a remote xul with an iframe in it, the <window> element on the
xul has a function on the onload event ( onload="someFunction();" );
if I load an HTML file in the iframe which have some other function
associated to the onload on his <body> tag, what happens is that the
onload event of the <body> trigger, but also triggers the onload event
of the <window> element. A detail is that the xul doesn't reload, just
the onload is triggered.

This doesn't happen if the parent is an HTML file instead of a XUL.

Reproducible: Always

Steps to Reproduce:
1.Open the given url.
2.Type some text in the textbox.
3.When you press on the button the page is loaded on the iframe, the textbox is
just to show that the xul is not reloaded.

Actual Results:  
The alert form the onload on the <body> appears, and then also appears the alert
of the onload on the <window>

Expected Results:  
The <window> alert sholdn't appear when the iframe is loaded.

I'm not really shure if it's a bug, but I think is kind of strange.
Keywords: testcase

*** This bug has been marked as a duplicate of 196057 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Verified duplicate.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.