diff --git a/libs/features/mas/commerce/checkout-link.md b/libs/features/mas/commerce/checkout-link.md index cdbc1863c5..707842124b 100644 --- a/libs/features/mas/commerce/checkout-link.md +++ b/libs/features/mas/commerce/checkout-link.md @@ -195,7 +195,11 @@ For each event except `click`, the following css classes are toggled on the elem eventsDemo.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); - logger('checkout link is clicked: ', e.target.href); + if (e.target.isCheckoutLink) { + logger('checkout link is clicked: ', e.target.href); + } else { + logger('element clicked: ', e.target); + } }); document.getElementById('btnRefresh').addEventListener('click', () => { [...eventsDemo.querySelectorAll('a')].forEach((a) => diff --git a/libs/features/mas/docs/checkout-link.html b/libs/features/mas/docs/checkout-link.html index 6b21d494ba..6b8d503c28 100644 --- a/libs/features/mas/docs/checkout-link.html +++ b/libs/features/mas/docs/checkout-link.html @@ -310,7 +310,11 @@

Example addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); - logger('checkout link is clicked: ', e.target.href); + if (e.target.isCheckoutLink) { + logger('checkout link is clicked: ', e.target.href); + } else { + logger('element clicked: ', e.target); + } }); document.getElementById('btnRefresh').addEventListener('click', () => { [...eventsDemo.querySelectorAll('a')].forEach((a) =>