src/Tost.js
/**
   * Create new tost element and append it to the container.
   * @param options
   * @private
   */
Create new tost element and append it to the container.
@param options
@private
Create new tost element and append it to the container . @param options @private
_add(options) {
    const tost = document.createElement('div');
    tost.classList.add(`tost`);
    if (utils.isValidTostType(options.type)) {
      tost.classList.add(`tost-${options.type}`);
    }
    tost.dataset.id = this._id;
    tost.innerHTML = `<span>${options && options.content}</span> <button class="tost-close">&times;</button>`;
    this._attachCloseListener(tost.querySelector('.tost-close'), this._id);
    this._appendToContainer(tost);
    return this._id;
  }
_add ( options ) { const tost = document . createElement ( 'div' ) ; tost . classList . add ( ` ` ) ; if ( utils . isValidTostType ( options . type ) ) { tost . classList . add ( ` ${ options . type } ` ) ; } tost . dataset . id = this . _id ; tost . innerHTML = ` ${ options && options . content } ` ; this . _attachCloseListener ( tost . querySelector ( '.tost-close' ) , this . _id ) ; this . _appendToContainer ( tost ) ; return this . _id ; }
Create new tost element and append it to the container.
Create new tost element and append it to the container .