PageSourceSearch

https://junglueck.de/cdn/shop/t/676/assets/quantity-rocker.js?v=168156875604224264801755085678

js junglueck.de collected 2026-10-02 07:19:11 UTC 2,214 bytes, 12 lines download raw bytes

1class QuantityRocker extends HTMLElement{static formAssociated=!0;#shadow=null;#shadowDecement=null;#shadowInput=null;#shadowIncrement=null;constructor(){super()}connectedCallback(){this.#shadow=this.attachShadow({mode:"open"}),this.internals=this.attachInternals(),this.render()}render(){this.#shadow&&(this.#shadow.innerHTML=`
2      <style>
3        input::-webkit-outer-spin-button,input::-webkit-inner-spin-button {-webkit-appearance: none; margin: 0;}
4        input:focus{outline: none;}
5      </style>
6      <div part="wrapper">
7          <button part="decrement" ${this.value==this.min?"disabled":""}>-</button>
8          <input part="input" type="number" aria-label="quantity" value="${this.value}" min="${this.min}" max="${this.max}">
9          <button part="increment" ${this.value==this.max?"disabled":""}>+</button>
10      </div>
11    `,this.#shadowDecement=this.#shadow.querySelector('[part="decrement"]'),this.#shadowDecement.addEventListener("click",()=>{this.value=this.value-1,this.update()}),this.#shadowInput=this.#shadow.querySelector('[part="input"]'),this.#shadowInput.addEventListener("change",()=>{this.value=Number(this.#shadowInput.value),this.update()}),this.#shadowIncrement=this.#shadow.querySelector('[part="increment"]'),this.#shadowIncrement.addEventListener("click",()=>{this.value=this.value+1,this.update()}))}update(){this.dispatchEvent(new Event("change")),this.render()}set value(v){const clampedValue=Math.max(this.min,Math.min(this.max,Number(v)));this.setAttribute("value",clampedValue),this.internals?.setFormValue(clampedValue)}get value(){return Number(this.getAttribute("value"))}set min(v){this.setAttribute("min",v)}get min(){return Number(this.getAttribute("min")||0)}set max(v){this.setAttribute("max",v)}get max(){return Number(this.getAttribute("max")||999)}get form(){return this.internals.form}get type(){return this.localName}static get observedAttributes(){return["value","id","min","max"]}attributeChangedCallback(property,oldValue,newValue){oldValue!==newValue&&(this[property]=newValue,this.render())}}customElements.define("quantity-rocker",QuantityRocker);
12//# sourceMappingURL=/cdn/shop/t/676/assets/quantity-rocker.js.map?v=168156875604224264801755085678

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.