[webkit-dev] About events in WebCore
mjs at apple.com
Tue Aug 18 18:03:43 PDT 2009
On Aug 18, 2009, at 5:46 PM, Michelangelo De Simone wrote:
> I've been working to add support for the checkValidity() method on
> (#27452); in order to complete that check I need to understand whether
> or not a specific event (invalid), previously fired from an element,
> has been canceled.
> Now, is there any generic/trivial way to accompish such checks? I
> don't like the idea to reinvent the wheel if there already is
If by canceled you mean "preventDefault" has been called on the event,
then you can tell by the return value from dispatchEvent().
dispatchEvent will return false if any of the event listeners called
preventDefault() on the event in the course of dispatch.
More information about the webkit-dev