Similarly to the following question:
I want to have two elements in my custom HTML component which have the
data-click-target attribute. How can I differentiate between them so I can trigger events based on that?
How can I trigger
utils.confetti() for the
primary value and
<div ... data-click-target="primary"> Confetti </div> <div ... data-click-target="secondary"> fetchData </div>
At the moment, they both trigger the same events (plural).
Clicking 'Confetti' triggers:
Clicking 'fetchData' triggers:
Which isn't what I wanted.
How can I separate these two events?