I was trying to combine querySelectorAll and matches() to add even listener like this:
HTML
<div id="bkLst" class="dropdown-menu">
<button class="dropdown-item" type="button" data-b="Book 1">Book 1</button>
<button class="dropdown-item" type="button" data-b="Book 2">Book 2</button>
<button class="dropdown-item" type="button" data-b="Book 12">Book 12</button>
</div>
JS
document.addEventListener("click", function(e){
if(e.target.querySelectorAll.matches("#bkLst button")){
...
}
});
But to no avail. What am I missing?