🗿 Mini jQuery alternative. Dependency-free animations. Locality of Behavior. Use one element or arrays transparently. Pairs with htmx. Vanilla querySelector() but better!
I noticed that the behavior for me(anEvent) returns the event's target. This means that you will often get a child of the element you attached the event handler to (if it has children.) I think maybe returning the currentTarget is the more logical choice, so that you always get the element back that you added the handler to.
I noticed that the behavior for
me(anEvent)
returns the event'starget
. This means that you will often get a child of the element you attached the event handler to (if it has children.) I think maybe returning thecurrentTarget
is the more logical choice, so that you always get the element back that you added the handler to.