You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should add event listeners to only some elements if a data attribute is used in markup
Examples 🌈
as suggested by Kent we can lister for a [data-listen-only] attribute. If some elements have this attribute we could attach event listener only on those elements.
Motivation 🔦
Because the user can be interested only on some elements
The text was updated successfully, but these errors were encountered:
The way that I see it, is that there is no difference in filtering on Event or on Target.
We need to think of a way to make the element selections, but I would prefer to have it be done in a visual way, and not with attributes.
The reasoning for that is, that attributes will not work when using devtools. They'll require the developer/tester to update the markup. Which is not always possible.
Summary 💡
We should add event listeners to only some elements if a data attribute is used in markup
Examples 🌈
as suggested by Kent we can lister for a
[data-listen-only]
attribute. If some elements have this attribute we could attach event listener only on those elements.Motivation 🔦
Because the user can be interested only on some elements
The text was updated successfully, but these errors were encountered: