tombol dinamis klik di JavaScript

window.addEventListener('load',function(){
  	const upsellBtn = document.querySelector('.parent-element-class');
        upsellBtn.addEventListener('click',function(e){
			const btnCurrent = e.target.closest('.target-class');
          	if(btnCurrent){
            	console.log( btnCurrent.getAttribute('data-product-id'));
            }
          
      });
  
  });
Breakable Bat