Closed
Bug 146151
Opened 23 years ago
Closed 22 years ago
image onload event returns document object as e.target
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: m.williams, Assigned: joki)
References
()
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2)
Gecko/20020510
BuildID: 2002051006
http://www.unitedchange.org/beta/mozilla_bug.php
In my javascript I was attempting to set an event listener to the load of an
image and then setting the border property of the image that has loaded. The
function gets called when the image is loaded but the target of the event object
is a [OBJECT HTMLDocument] and not the image node.
Therefore I can't set any of the properties of the image.
In order to highlight that the object is a document I alert it's URL.
I can't think of a workaround.
Reproducible: Always
Steps to Reproduce:
1.Type "song" (no quotes) in 'search for' and submit
2.when the images load an alert box shows the target URL!?
Actual Results: The event object target is the document
Expected Results: The event object target should be the image node
Comment 1•22 years ago
|
||
bug 22710 fixed the problem you are describing as can be seen from its coments.
What you are experiencing is probably that the image onload events do not bubble
up, which is done on purpose. Feel free to reopen if I am wrong.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Summary: image onload event returns document object as e.target → image onload event returns document object as e.target
You need to log in
before you can comment on or make changes to this bug.
Description
•