Re: Clarification on "cancelling" pointerdown

On 1/22/2014 2:39 AM, Patrick H. Lauke wrote:
> "Authors can prevent the production of compatibility mouse events by 
> cancelling the pointerdown event."
> Do we mean preventDefault? return false? event.returnValue = false?

Yes.  :)   We mean the "canceled flag" on the event, which is set and 
returned by the DOM preventDefault method and defaultPrevented 
attribute.  From DOM4:

    The |preventDefault()| method must set the canceled flag
    <> if the |cancelable
    <>| attribute value is

    The |defaultPrevented| attribute must return true if the canceled
    flag <> is set and false

The HTML standard also specifies that "return false" in certain 
conditions should cancel an event:

    If return value is a WebIDL boolean false value, then cancel the event.

Received on Wednesday, 22 January 2014 18:50:59 UTC