Bug 64847

Summary: Calling initEvent after event dispatch should not reinitialize the event
Product: WebKit Reporter: Dominic Cooney <dominicc>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: annevk, dominicc
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Dominic Cooney
Reported 2011-07-19 23:44:13 PDT
Per the DOM 3 Events spec draft: <http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-event-type-initEvent> At r91186, initEvent is a no-op if the event is _being_ dispatched, but the event can be reinitialized after dispatch is done. However the spec says that initEvent should be a no-op: "This method has no effect if called after the event has been dispatched." DOM 2 Events also specifies this, albeit in less specific language. <http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event-initEvent>
Attachments
Dominic Cooney
Comment 1 2011-07-20 17:54:52 PDT
Per the DOM Core draft, calling initEvent after event dispatch _should_ reinitialize the event: <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-event-initevent> initEvent should only be prevented while the event is being dispatched. WebKit already does it this way.
Note You need to log in before you can comment on or make changes to this bug.