Summary: | event handlers in DOM don't work | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Jiri Palecek <jpalecek> |
Component: | khtml ecma | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | maksim |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | A testcase |
Description
Jiri Palecek
2005-08-26 17:52:53 UTC
Created attachment 12481 [details]
A testcase
I've developp a full xforms 1.1 engine in javascript. And this bug hang my software. I use a lot of OOP and DOM events. <form> <input id="something" type="checkbox"></input> <script> function handle(e) { alert(this.aaa); } var x=document.getElementById('something'); x.addEventListener("change",{handleEvent:handle,aaa:"Ok"},false); SVN commit 785693 by orlovich: Apply a patch from Vyacheslav Tokarev (username tsjoker, hostname gmail, tld com) that fixes multiple issues with event listeners: 1. Use the proper 'this' object for object-style event listeners. 2. Use the object, not function, for comparison of object-style event listeners 3. Properly keep html-style and normal listener objects separate --- they behave independent, even if they wrap the same function, and of course have different event-cancellation semantics BUG:147249 BUG:111568 BUG:128416 M +12 -8 kjs_events.cpp M +2 -2 kjs_events.h M +6 -6 kjs_window.cpp M +1 -1 kjs_window.h WebSVN link: http://websvn.kde.org/?view=rev&revision=785693 SVN commit 785698 by orlovich: Regression tests for event listener changes... CCBUG:147249 CCBUG:111568 CCBUG:128416 A baseline/events/dom-style-event.html-dom AM baseline/events/dom-style-event.html-dump.png A baseline/events/dom-style-event.html-render A baseline/events/two-listener-kinds.html-dom AM baseline/events/two-listener-kinds.html-dump.png A baseline/events/two-listener-kinds.html-render A baseline/events/two-listener-kinds2.html-dom AM baseline/events/two-listener-kinds2.html-dump.png A baseline/events/two-listener-kinds2.html-render A tests/events/dom-style-event.html A tests/events/two-listener-kinds.html A tests/events/two-listener-kinds2.html WebSVN link: http://websvn.kde.org/?view=rev&revision=785698 |