onUpdateFunction: function(el, data) {
        document.querySelectorAll('a[href="/cart"]').forEach(function(link) {
            if (!link.dataset.drawerBound) {
                link.dataset.drawerBound = '1';
                link.addEventListener('click', function(e) {
                    e.preventDefault();
                    document.body.classList.add('open-cart-drawer');
                });
            }
        });
    }

 

Buy me a coffee