function buildNotificationCard (messageText, iconClass) {
      // Card wrapper
    var notification = document.createElement('div')
    notification.className = 'notyf__toast'

    var wrapper = document.createElement('div')
    wrapper.className = 'notyf__wrapper'

    var iconContainer = document.createElement('div')
    iconContainer.className = 'notyf__icon'

    var icon = document.createElement('i')
    icon.className = iconClass

    var message = document.createElement('div')
    message.className = 'notyf__message'
    message.innerHTML = messageText

      // Build the card
    iconContainer.appendChild(icon)
    wrapper.appendChild(iconContainer)
    wrapper.appendChild(message)
    notification.appendChild(wrapper)

    var _this = this
    setTimeout(function () {
      notification.className += ' notyf--disappear'
      notification.addEventListener(_this.animationEnd, function (event) {
        event.target == notification && _this.container.removeChild(notification)
      })
      var index = _this.notifications.indexOf(notification)
      _this.notifications.splice(index, 1)
    }, _this.options.delay)

    return notification
  }
/**
    * Creates a generic card with the param message. Returns a document fragment.
    */
Creates a generic card with the param message. Returns a document fragment.
Creates a generic card with the param message . Returns a document fragment .
function buildNotificationCard (messageText, iconClass) {
    var notification = document.createElement('div')
    notification.className = 'notyf__toast'
    var wrapper = document.createElement('div')
    wrapper.className = 'notyf__wrapper'
    var iconContainer = document.createElement('div')
    iconContainer.className = 'notyf__icon'
    var icon = document.createElement('i')
    icon.className = iconClass
    var message = document.createElement('div')
    message.className = 'notyf__message'
    message.innerHTML = messageText
    iconContainer.appendChild(icon)
    wrapper.appendChild(iconContainer)
    wrapper.appendChild(message)
    notification.appendChild(wrapper)
    var _this = this
    setTimeout(function () {
      notification.className += ' notyf--disappear'
      notification.addEventListener(_this.animationEnd, function (event) {
        event.target == notification && _this.container.removeChild(notification)
      })
      var index = _this.notifications.indexOf(notification)
      _this.notifications.splice(index, 1)
    }, _this.options.delay)
    return notification
  }
function buildNotificationCard ( messageText , iconClass ) { var notification = document . createElement ( 'div' ) notification . className = 'notyf__toast' var wrapper = document . createElement ( 'div' ) wrapper . className = 'notyf__wrapper' var iconContainer = document . createElement ( 'div' ) iconContainer . className = 'notyf__icon' var icon = document . createElement ( 'i' ) icon . className = iconClass var message = document . createElement ( 'div' ) message . className = 'notyf__message' message . innerHTML = messageText iconContainer . appendChild ( icon ) wrapper . appendChild ( iconContainer ) wrapper . appendChild ( message ) notification . appendChild ( wrapper ) var _this = this setTimeout ( function ( ) { notification . className += ' notyf--disappear' notification . addEventListener ( _this . animationEnd , function ( event ) { event . target == notification && _this . container . removeChild ( notification ) } ) var index = _this . notifications . indexOf ( notification ) _this . notifications . splice ( index , 1 ) } , _this . options . delay ) return notification }
Creates a generic card with the param message.
Creates a generic card with the param message .
// Card wrapper // Build the card