function Slider(container, value, min, max, opt_onChange) {
  this.container_ = container;
  this.onChange_ = opt_onChange;

  let containerDocument = this.container_.ownerDocument;

  this.container_.classList.add('slider');

  this.input_ = containerDocument.createElement('input');
  this.input_.type = 'range';
  this.input_.min = min;
  this.input_.max = max;
  this.input_.value = value;
  this.container_.appendChild(this.input_);

  this.input_.addEventListener('change', this.onInputChange_.bind(this));
  this.input_.addEventListener('input', this.onInputChange_.bind(this));

  this.bar_ = containerDocument.createElement('div');
  this.bar_.className = 'bar';
  this.container_.appendChild(this.bar_);

  this.filled_ = containerDocument.createElement('div');
  this.filled_.className = 'filled';
  this.bar_.appendChild(this.filled_);

  let leftCap = containerDocument.createElement('div');
  leftCap.className = 'cap left';
  this.bar_.appendChild(leftCap);

  let rightCap = containerDocument.createElement('div');
  rightCap.className = 'cap right';
  this.bar_.appendChild(rightCap);

  this.updateFilledWidth_();
}
Creates a slider control.

@param {HTMLElement} container The containing div element.
@param {number} value Initial value
@param {number} min Minimum value
@param {number} max Maximum value
@param {?function(number)=} opt_onChange Value change handler
@constructor