In JQuery I can do:
$(document).on(\"click\",\"a.someBtn\",function(e){
console.log(\"hi\");
});
to add an event listener to an element th
Use the target property in the event
object to get the clicked element. Then, manually test for type/attributes/ids
document.addEventListener( "click", someListener );
function someListener(event){
var element = event.target;
if(element.tagName == 'A' && element.classList.contains("someBtn")){
console.log("hi");
}
}