lib/suggestion-list-element.js
// Splits the classes on spaces so as not to anger the DOM gods
Splits the classes on spaces so as not to anger the DOM gods
Splits the classes on spaces so as not to anger the DOM gods
addClassToElement (element, classNames) {
    if (!classNames) { return }
    const classes = classNames.split(' ')
    if (classes) {
      for (let i = 0; i < classes.length; i++) {
        let className = classes[i]
        className = className.trim()
        if (className) { element.classList.add(className) }
      }
    }
  }
addClassToElement ( element , classNames ) { if ( ! classNames ) { return } const classes = classNames . split ( ' ' ) if ( classes ) { for ( let i = 0 ; i < classes . length ; i ++ ) { let className = classes [ i ] className = className . trim ( ) if ( className ) { element . classList . add ( className ) } } } }
Splits the classes on spaces so as not to anger the DOM gods
Splits the classes on spaces so as not to anger the DOM gods