You can use the removeAttribute() method of HTMLElement.
First, you need to select the element. There are several ways, I prefer to use querySelector().
The query selects a a element with the class cart-contents and the attribute data-toggle.
Then, simply call the removeAttribute method.
const $toRemoveAttrElem = window.document.querySelector("a.cart-contents[data-toggle]");
$toRemoveAttrElem.removeAttribute("data-toggle");