Bug 20938
Summary: | JavaScript cannot "delete" event handlers | ||
---|---|---|---|
Product: | WebKit | Reporter: | Berend-Jan Wever <skylined> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | oliver |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Windows Vista | ||
URL: | http://skypher.com/SkyLined/Repro/Chrome/eventHandlers/repro.html |
Berend-Jan Wever
This simple script explains the problem:
<BODY onload="delete onload;alert(onload);">
The alert shows the event handler survives the "delete" operation. Also setting the event handler to "undefined" actually sets it to "null".
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Oliver Hunt
I'm not sure why setting the handlers to undefined fails, but it is correct behaviour for it to not be possible to delete the onhandlers.