Peter,
thank you for letting others know that about my modest contribution.
For the records NWEvents will do just fine alone if the requirements
are easy as delegation of simple selectors (id, tag, className and
combinations of these).
If the requirements are about more complex selection like newer CSS3
selectors, as :not() :empty :nth-of-type(ab +n), or similar combined
pseudo selectors then you will have to add NWMatcher too. In the
latest versions if you are using a recent Webkit browser t is not
necessary to load NWMatcher anymore, since the more powerful
"querySelectorAll()" is directly implemented in NWEvents.
Support for "querySelectorAll()" on other browsers is still missing
natively. FF 3.1 should have it, IE8 beta2 has it too (still buggy
though).
So at the moment for complex selector it is better to load NWMatcher,
that will ensure those CSS3 selector works on less capable or buggy
browsers without loosing speed and scalability of this delegation
model.
Hope it helps you have more reasons to use it, and feel free to
contact me for help or suggestions.
@Ken, thank you for the compliments, hope to have suggestions from you
too.
--
Diego Perini
On 19 Set, 11:58, Peter De Berdt <[EMAIL PROTECTED]> wrote:
> On 18 Sep 2008, at 16:30, Ken Snyder wrote:
>
>
>
> >> A question, does the focus effect bubble ??
>
> >> because this work:
> >> $(document.body).observe('click', function(e) {
> >> var _elem=Event.element(e);
> >> alert(_elem.tagName);
> >> return;
> >> });
>
> >> but not the same code when you use the focus event instead of the
> >> click event works.
>
> >> --
> >> david
>
> > That is correct. The focus event does not bubble.
> > (http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation...
> > ).
>
> > The article mentions you should not use event delegation for focus,
> > blur, load, unload, or mousemove.
>
> We're using event delegation for form validation and tooltips (so
> using blur/focus/submit, three "non-bubbling" events) with
> NWEvents:http://code.google.com/p/nwevents/
>
> Works perfectly btw and has no Prototype incompatibilities.
>
> Example athttp://javascript.nwbox.com/NWEvents/delegates.html
>
> Best regards
>
> Peter De Berdt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---