I'm looking for a way to pass parameters to the event handler (addEventListener) when the click event of e. g. an button is triggered by code.
My solution is to add an own attribute to the element itself, like
document.getElementById("ButtonId").MyAttribute = MyValue ; document.getElementById("ButtonId").click() ;
But I'm really interested in other solutions which should use first off all only JavaScript and then as an alternative JQuery. I'm aware of the JQuery event.data object, but maybe there are other solutions.
Many thanks and greetings
ANTLRStarter