[dokuwiki] Re: events

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 24 Apr 2006 00:17:41 +0100

Martin Tschofen wrote:

On 4/23/06, Chris Smith <chris@xxxxxxxxxxxxx> wrote:
Martin Tschofen wrote:
But I get instead:
Collect print
TPL_Display_HTML output
Collect print

Thats exactly right. You didn't issue a preventDefault for
TPL_DISPLAY_HTML. The default behaviour is to output the event data.

AHA.
When I set preventDefault() in TPL_Display_HTML the _after event must
be affected as well as it doesn't output anything anymore. Is that by
design? Or am I doing something else wrong...martin
Currently, if you prevent default, you prevent the _after event yes. Maybe that isn't such a good idea. I think from the discussion with Ben there will be an _after event in all circumstances (after the patch).

Thinking about that now, that implies ...
- an event should be able to set event results and it should (at least in someway) if its uses preventDefault
- preventDefault stops default action not _after event
- stopPropagation stops further event propagation of current event, if current event is a _before event, the _after event will still be signalled.


Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: