RESOLVED FIXED 8511
onerror JS property does not register listener properly
https://bugs.webkit.org/show_bug.cgi?id=8511
Summary onerror JS property does not register listener properly
Maciej Stachowiak
Reported 2006-04-21 00:40:08 PDT
The onerror JS property doesn't properly register an error listener on img elements (the onerror HTML attribute does): <img src="http://www.google.com/intl/en/images/logo.giffff" id="foo"> <script> document.getElementById("foo").onerror = function(event) { alert('error property'); }; </script> I believe this is because in kjs_dom.cpp the bindings code registers a listener for khtmlErrorEvent instead of errorEvent for this property.
Attachments
Patch using maciej's fix. (924 bytes, patch)
2006-04-21 10:06 PDT, Jon
ggaren: review-
test case (1.06 KB, text/html)
2006-04-21 10:23 PDT, Geoffrey Garen
no flags
Patch plus test case. (6.27 KB, patch)
2006-04-21 11:51 PDT, Jon
no flags
Better patch and test case. (6.52 KB, patch)
2006-04-21 12:01 PDT, Jon
no flags
Patch with working test and results. (6.34 KB, patch)
2006-04-21 12:40 PDT, Jon
ggaren: review+
Jon
Comment 1 2006-04-21 10:06:29 PDT
Created attachment 7875 [details] Patch using maciej's fix. Here's a patch using Maciej's suggested fix.
Geoffrey Garen
Comment 2 2006-04-21 10:23:25 PDT
Created attachment 7876 [details] test case
Geoffrey Garen
Comment 3 2006-04-21 10:24:15 PDT
Comment on attachment 7875 [details] Patch using maciej's fix. we talked about this on irc -- no changelog, no test case, doesn't fix window.onerror.
Jon
Comment 4 2006-04-21 11:51:20 PDT
Created attachment 7879 [details] Patch plus test case.
Jon
Comment 5 2006-04-21 12:01:59 PDT
Created attachment 7880 [details] Better patch and test case.
Jon
Comment 6 2006-04-21 12:40:25 PDT
Created attachment 7882 [details] Patch with working test and results.
Geoffrey Garen
Comment 7 2006-04-21 12:45:00 PDT
Comment on attachment 7882 [details] Patch with working test and results. r=me
Eric Seidel (no email)
Comment 8 2006-04-21 14:28:44 PDT
Sweet! A new contributer! Now we just need to convince Jon to join us on #webkit. :)
Darin Adler
Comment 9 2006-04-21 22:31:24 PDT
Yes, removes khtmlError entirely! Hooray!
Alexey Proskuryakov
Comment 10 2006-05-03 04:51:13 PDT
*** Bug 6688 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.