code: function DropdownButton(label, items, itemRenderer) {
          this.items = items;
  
          this.itemRenderer = itemRenderer || this.itemRenderer;
  
          this._onClick        = this._onClick.bind(this);
          this.closeDropdown   = this.closeDropdown.bind(this);
          this._onClickOutside = this._onClickOutside.bind(this);
  
          this.$button = $("<button class='btn btn-dropdown'/>")
              .text(label)
              .on("click", this._onClick);
      }
docs: Creates a single dropdown-button instance. The DOM node is created but not attached to
  the document anywhere - clients should append this.$button to the appropriate location.
  
  DropdownButton dispatches the following events:
  - "select" - when an option in the dropdown is clicked. Passed item object and index.
  
  @param {!string} label  Label to display on the button
  @param {!Array.<*>} items  Items in the dropdown list. It generally doesn't matter what type/value the
  items have, except that any item === "---" will be treated as a divider. Such items are not
  clickable and itemRenderer() will not be called for them.
  @param {?function(*, number):!string|{html:string, enabled:boolean} itemRenderer  Optional function to
  convert a single item to HTML (see itemRenderer() docs below). If not provided, items are
  assumed to be plain text strings.