Bug 64847 - Calling initEvent after event dispatch should not reinitialize the event
Summary: Calling initEvent after event dispatch should not reinitialize the event
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 23:44 PDT by Dominic Cooney
Modified: 2011-07-20 17:54 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Cooney 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>
Comment 1 Dominic Cooney 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.