Closed Bug 258587 Opened 20 years ago Closed 20 years ago

window.addEventListener overrides OnLoad if already set

Categories

(Core :: DOM: Events, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: yalanop, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616


Suppose we have the code <body onLoad="doSomething()"> ...

and we include a js script with the following line of code...

if(window.addEventListener) window.addEventListener("load",OLonLoad_handler,true)

then the doSomething procedure will not execute. I think it is a bug of mozilla



Reproducible: Always
Steps to Reproduce:
1. Simple bug explained in details above...
2.
3.

Actual Results:  
Simple bug explained in details above...

Expected Results:  
Simple bug explained in details above...
Assignee: js-console → events
Component: JavaScript Console → DOM: Events
QA Contact: jrgmorrison → ian
Attached file Testcase
Attached testcase works fine in a 1.8a3 build.  Does it work in 1.7?  If yes,
please attach a testcase that does not work...
Works for me too:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
Works for me Mozilla 1.7.3 and no further info from reporter, marking WFM.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: