Unable to use addToViewEventsDefinition in 2021
Below is the example which is not working for me.
Layout.addToViewEventsDefinition(
‘ProductDetails.ImageGallery.View’,
‘click [data-action=”test”]’,
function(e) {
console.log(e);
}
);
I also tried pdp.addToViewEventsDefinition but that didn’t work too
Any help would be appreciated.