function init() {
    if ( !atomicHelpers.setInitFlag( _dom ) ) {
      return standardType.UNDEFINED;
    }

    _name = _dom.name;
    _options = _dom.options || [];
    _placeholder = _dom.getAttribute( 'placeholder' );
    _filteredData = _optionsData = _sanitizeOptions( _options );

    if ( _optionsData.length > 0 ) {
      var newDom = _populateMarkup();

      // Removes <select> element,
      // and re-assign DOM reference.
      _dom.parentNode.removeChild( _dom );
      _dom = newDom;
      // We need to set init flag again since we've created a new <div>
      // to replace the <select> element.
      atomicHelpers.setInitFlag( _dom );

      _bindEvents();
    }

    return this;
  }
/**
   * Set up and create the multi-select.
   * @returns {Multiselect|undefined} An instance,
   *   or undefined if it was already initialized.
   */
Set up and create the multi-select.
@returns {Multiselect|undefined} An instance,
or undefined if it was already initialized.
Set up and create the multi - select . @returns { Multiselect|undefined } An instance or undefined if it was already initialized .
function init() {
    if ( !atomicHelpers.setInitFlag( _dom ) ) {
      return standardType.UNDEFINED;
    }
    _name = _dom.name;
    _options = _dom.options || [];
    _placeholder = _dom.getAttribute( 'placeholder' );
    _filteredData = _optionsData = _sanitizeOptions( _options );
    if ( _optionsData.length > 0 ) {
      var newDom = _populateMarkup();
      _dom.parentNode.removeChild( _dom );
      _dom = newDom;
      atomicHelpers.setInitFlag( _dom );
      _bindEvents();
    }
    return this;
  }
function init ( ) { if ( ! atomicHelpers . setInitFlag ( _dom ) ) { return standardType . UNDEFINED ; } _name = _dom . name ; _options = _dom . options || [ ] ; _placeholder = _dom . getAttribute ( 'placeholder' ) ; _filteredData = _optionsData = _sanitizeOptions ( _options ) ; if ( _optionsData . length > 0 ) { var newDom = _populateMarkup ( ) ; _dom . parentNode . removeChild ( _dom ) ; _dom = newDom ; atomicHelpers . setInitFlag ( _dom ) ; _bindEvents ( ) ; } return this ; }
Set up and create the multi-select.
Set up and create the multi - select .
// Removes <select> element, // and re-assign DOM reference. // We need to set init flag again since we've created a new <div> // to replace the <select> element.