W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Fwd: event.returnValue

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Thu, 16 Sep 2010 11:09:37 -0700
Message-ID: <AANLkTika6TnHwYaXWnmwfDrUx5YyKu2-MDHDzZ8mwT2X@mail.gmail.com>
To: www-style <www-style@w3.org>
Forwarding previously blocked message.

---------- Forwarded message ----------
From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Tue, 14 Sep 2010 23:42:14 -0700
Subject: Re: event.returnValue
To: "Hallvord R. M. Steen" <hallvord@opera.com>
Cc: Jonas Sicking <jonas@sicking.cc>, www-dom@w3.org

On 9/14/10, Hallvord R. M. Steen <hallvord@opera.com> wrote:
> [Replying to two responses at once - Jonas and Garret]
>> A potential nasty edge case:
> I'd simply say the last one should always 'win'.

MSDN says otherwise. look here:
"    The value of this property takes precedence over values returned
by the function, such as through a Microsoft JScript return statement.


And so how complicated will it be when one or more functions returns
false, sets e.returnValue = false, and calls ev.preventDefault()?

> Since order event handlers trigger in is normally undefined this is close
> to being a hard question - but we're making it a bit simpler by adding a
> capturing event listener. So clickHandler runs first, then the
> clickHandler2 method.

I'm not sure I agree.
"Event handlers therefore always fire before event listeners attached
using addEventListener()."

And Event order is defined in D3E.

"Next, the implementation must determine the current target's
candidate event listeners. This shall be the list of all event
listeners that have been registered on the current target in their
order of registration. Once determined, the candidate event listeners
cannot be changed; adding or removing listeners does not affect the
current target's candidate event listeners."

Received on Thursday, 16 September 2010 18:10:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC