window.addEventListener overrides OnLoad if already set

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
14 years ago
14 years ago

People

(Reporter: yalanop, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
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 testcase works fine in a 1.8a3 build.  Does it work in 1.7?  If yes,
please attach a testcase that does not work...

Comment 3

14 years ago
Works for me too:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3

Comment 4

14 years ago
Works for me Mozilla 1.7.3 and no further info from reporter, marking WFM.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.