PageSourceSearch

https://namuk.com/cdn/shop/t/119/assets/product-form.js?v=120950843954088088321789544158

js namuk.com collected 2026-09-25 18:46:47 UTC 1,838 bytes, 2 lines download raw bytes

1if(!customElements.get("product-form")){let productFormSubmitting=false;class ProductForm extends HTMLElement{constructor(){super();this.form=this.querySelector("form");this.form.addEventListener("submit",this.onSubmitHandler.bind(this),true);this.cartNotification=document.querySelector("cart-notification");this.cartDrawer=document.querySelector("cart-drawer")}onSubmitHandler(evt){evt.preventDefault();evt.stopImmediatePropagation();if(productFormSubmitting)return;productFormSubmitting=true;const submitButton=this.querySelector('[type="submit"]');submitButton.setAttribute("disabled",true);submitButton.classList.add("loading");const config=fetchConfig("javascript");config.headers["X-Requested-With"]="XMLHttpRequest";delete config.headers["Content-Type"];let cartDrawerFetch=[];if(this.cartDrawer){cartDrawerFetch=this.cartDrawer.getSectionsToRender().map(section=>section.id)}const sectionsToFetch=[...new Set([...cartDrawerFetch,...this.cartNotification.getSectionsToRender().map(section=>section.id)])];const formData=new FormData(this.form);formData.append("sections",sectionsToFetch);formData.append("sections_url",window.location.pathname);config.body=formData;const urlToFetch=window.routes?.cart_add_url||"/cart/add";fetch(`${urlToFetch}`,config).then(response=>response.json()).then(parsedState=>{if(parsedState.status==422){this.cartNotification.setActiveElement(document.activeElement);this.cartNotification.renderQuantityError(formData.get("inventory_quantity"));return}this.cartDrawer?.renderContents(parsedState);this.cartDrawer?.open()}).catch(e=>{console.error(e)}).finally(()=>{productFormSubmitting=false;submitButton.classList.remove("loading");submitButton.removeAttribute("disabled")})}}window.ProductForm=ProductForm;customElements.define("product-form",ProductForm)}
2//# sourceMappingURL=product-form.js.map

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.