Closed Bug 306199 Opened 19 years ago Closed 19 years ago

window.addEventListener("load", ...) fires too late

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 28293

People

(Reporter: dmitrysv, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: 

The following Javascript code:

window.addEventListener("load", uc_onload_handler, false);

fires uc_onload_handler() handler _only_ after all dynamically added
JS files are downloaded and parsed while it should fire just after
only the html file itself finished loading(as in IE).

IE is correct with this.


Reproducible: Always
Thats not correct. The JS files may contain code that is used by what ever the
window.addEventListener fires. If it fire before parsing those JS files you will
get "no such... exists" 
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
I'am insisting that this is a bug since 
no one will develop the Mozilla only page.

There is a "script.onload" hook to find out
if the script is fully loaded but since the 
script is loading asynchronously the onload
event should be reported before dyn. added
scripts fishished loading/parsing.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
And besides, where is "defer" attribute support(HTML 4.01 specification)?
http://www.websiteoptimization.com/speed/tweak/defer/

The defer argument is addressed in bug 28293
Meanwhile changing the functionality right now to execute the event before the
scripts load will break an unimaginable amout of webpages.

Will seek further assistance from bz.
Status: UNCONFIRMED → NEW
Ever confirmed: true
that onload waits until scripts are downloaded is not a bug. that it waits until
scripts with defer attributes are downloaded is bug 28293

*** This bug has been marked as a duplicate of 28293 ***
Status: NEW → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.