flip101
2015-10-06 00:43:51 UTC
with jQuery i use event delegation from time to
time https://api.jquery.com/on/
it puts the event handler on a parent element
then when a child is clicked the event bubbles upwards to the parent
the selector is then check to see if it matches (not at the time it was
bind)
this can be a lot faster then attaching event handlers to each dom element
separately. Especially in the case of a lot of handlers.
How does elm handle this? Should i do anything special in my code or just
bind to each element?
time https://api.jquery.com/on/
it puts the event handler on a parent element
then when a child is clicked the event bubbles upwards to the parent
the selector is then check to see if it matches (not at the time it was
bind)
this can be a lot faster then attaching event handlers to each dom element
separately. Especially in the case of a lot of handlers.
How does elm handle this? Should i do anything special in my code or just
bind to each element?
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.