backgroundSize
backgroundSize
будет отслеживаться только после того как мы отпустим кнопку мышки.var sliderChange = document.querySelector('input[type=range');
sliderChange.onchange = function () {
sliderChangeFunc();
};
function sliderChangeFunc() {
var value = sliderChange.value,
min = sliderChange.getAttribute('min'),
max = sliderChange.getAttribute('max');
sliderChange.style.backgroundSize = (value - min) * 100 / (max - min) + '%' + ' 100%';
};
sliderChange.addEventListener("input", function(e) {
sliderChangeFunc();// Prints "Example of an event"
});
// Create the event
var event = new CustomEvent("input");
// Dispatch/Trigger/Fire the event
sliderChange.dispatchEvent(event);