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

RESOLVED DUPLICATE of bug 28293

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 28293
12 years ago
12 years ago

People

(Reporter: Dmitry Sychov, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
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

Comment 1

12 years ago
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
Last Resolved: 12 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

12 years ago
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 → ---
(Reporter)

Comment 3

12 years ago
And besides, where is "defer" attribute support(HTML 4.01 specification)?
http://www.websiteoptimization.com/speed/tweak/defer/

Comment 4

12 years ago
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
Last Resolved: 12 years ago12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.