Bug 20938

Summary: JavaScript cannot "delete" event handlers
Product: WebKit Reporter: Berend-Jan Wever <skylined>
Component: New BugsAssignee: 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
Reported 2008-09-19 07:38:57 PDT
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
Oliver Hunt
Comment 1 2008-09-19 16:18:15 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.