code: function update() {
      min = isAttrNum(slider.min) ? +slider.min : 0;
      max = isAttrNum(slider.max) ? +slider.max : 100;
      if (max < min)
        max = min > 100 ? min : 100;
      step = isAttrNum(slider.step) && slider.step > 0 ? +slider.step : 1;
      range = max - min;
      draw(true);
    }
docs: validates min, max, and step attributes and redraws