PageSourceSearch

https://www.sueco.com/cdn/shop/t/6/assets/cart-notification.js?v=111487870555333929371733331870

js sueco.com collected 2026-10-05 11:32:29 UTC 2,707 bytes, 2 lines download raw bytes

1class CartNotification extends HTMLElement{constructor(){super(),this.notification=document.getElementById("cart-notification"),this.header=document.querySelector("sticky-header"),this.onBodyClick=this.handleBodyClick.bind(this),this.notification.addEventListener("keyup",evt=>evt.code==="Escape"&&this.close()),this.querySelectorAll('button[type="button"]').forEach(closeButton=>closeButton.addEventListener("click",this.close.bind(this)))}open(){this.notification.classList.add("animate","active"),this.notification.addEventListener("transitionend",()=>{this.contenScrollTo(0)},{once:!0}),document.body.addEventListener("click",this.onBodyClick)}contenScrollTo(scrollTo){window.scrollY>scrollTo?setTimeout(()=>{window.scrollTo(0,window.scrollY-16),this.contenScrollTo(scrollTo)},5):(this.notification.focus(),trapFocus(this.notification))}close(){this.notification.classList.remove("active"),document.body.removeEventListener("click",this.onBodyClick),removeTrapFocus(this.activeElement)}renderContents(parsedState,qtyValue=1){this.productId=parsedState.id,this.getSectionsToRender().forEach((section=>{if(section.id==="cart-icon-bubble"){const productCartIcon=document.getElementById("cart-icon-bubble--product");productCartIcon&&(productCartIcon.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.id],section.selector))}if(document.getElementById(section.id).innerHTML=this.getSectionInnerHTML(parsedState.sections[section.id],section.selector),section.id==="cart-notification-product"){const priceElm=document.querySelector(".cart-notification-product__price");if(priceElm){const calculatePrice=parsedState.final_price*qtyValue;var finalprice=Shopify.formatMoney(calculatePrice,priceElm.dataset.currencyFormat);priceElm.textContent=finalprice}}})),this.header&&this.header.reveal(),this.open()}getSectionsToRender(){return[{id:"cart-notification-product",selector:`#cart-notification-product-${this.productId}`},{id:"cart-icon-bubble"}]}getSectionInnerHTML(html,selector=".shopify-section"){const sourceElement=new DOMParser().parseFromString(html,"text/html").querySelector(selector),colorSwatch=sourceElement.querySelector(".color-swatch");return colorSwatch&&hideUnavailableColors(colorSwatch),sourceElement.innerHTML}handleBodyClick(evt){const target=evt.target;if(target!==this.notification&&!target.closest("cart-notification")){const disclosure=target.closest("details-disclosure");this.activeElement=disclosure?disclosure.querySelector("summary"):null,this.close()}}setActiveElement(element){this.activeElement=element}}customElements.define("cart-notification",CartNotification);
2//# sourceMappingURL=/cdn/shop/t/6/assets/cart-notification.js.map?v=111487870555333929371733331870

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.