Re: [XBL] The handler Element

Cameron McCormack:
> > 2.11 The handler Element
> > 
> >   If default-action is specified, then the event handler must only be
> >   fired during the default phase (if it occurs). Otherwise, the handler
> >   must only be fired during the bubbling phase.
> > 
> > Does this mean that if a handler for the default-action phase is 
> > specified, but the given event does not have such a phase, that the 
> > handler is fired during the bubbling phase?  Or not at all?  This should 
> > be made clearer.

Ian Hickson:
> It seems pretty clear to me. The context is:
> 
>    This attribute... When specified, the value must be one of capture, 
>    target, bubble, or default-action. If capture... capturing... If 
>    target... target.... If default-action... default... Otherwise... 
>    bubbling...
> 
> Did you interpret the Otherwise as referring to the parenthetical?

Well, I interpreted the parenthetical as maybe restricting the case of
when the default phase event handler should be fired, and so the
otherwise would capture the remaining cases (bubbling, or default-action
with no default phase).

Now that you’ve pointed it out, it seems reasonable that the “(if it
occurs)” is evaluated after noticing "default-action".

-- 
Cameron McCormack, http://mcc.id.au/
 xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

Received on Saturday, 13 January 2007 07:40:01 UTC