Closed
Bug 257556
Opened 20 years ago
Closed 20 years ago
Wrong target and currentTarget for load event on body element
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bobe+bugzilla, Unassigned)
Details
Attachments
(1 file)
709 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040817 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040817 currentTarget and target properties of event object give wrong informations. currentTarget shoud be HTMLBodyElement object, and target also. Reproducible: Always Steps to Reproduce: Actual Results: currentTarget value is Window object and target value is HTMLDocument object. Expected Results: currentTarget and target values should be HTMLBodyElement object
Reporter | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
The onload attribute on <body> is mapped to window.onload, so setting that attribute actually sets an event handler on the <window>, not on the <body>... That's the right behavior for this DOM0 functionality. Given that, currentTarget should in fact be the window. target should be the document, since that's what has loaded (the body being loaded makes no sense, since the onload event is for the document load).
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•