| 3 | |
| 4 | |
| 5 | function handelUpdate() { |
| 6 | const suffix = this.dataset.sizing || ''; |
| 7 | // sizing is data property set in indexedDB.html |
| 8 | document.documentElement.style.setProperty(`--${this.name}`,this.value+suffix); |
| 9 | // set property function syntax is setProperty('whixh variable is to changed , what should be its new value ') |
| 10 | |
| 11 | console.log(this.value); |
| 12 | |
| 13 | } |
| 14 | |
| 15 | inputs.forEach(input => input.addEventListener('change', handelUpdate)); |
| 16 | inputs.forEach(input => input.addEventListener('mousemove', handelUpdate)); |