Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function renderResults (emojiNameArray, containerElement) {
containerElement.innerHTML = ''
var fragment = document.createDocumentFragment()
var modifierValue = preference['skin-tone-modifier']
var modifier = modifiers.indexOf(modifierValue) >= 0 ? modifierValue : null
// console.log('display search results', emojiNameArray.length)
emojiNameArray.forEach(function (name) {
var unicode = addModifier(emojilib[name], modifier) || '--'
var resultElement = document.createElement('button')
resultElement.type = 'button'
resultElement.className = 'emoji'
resultElement.setAttribute('aria-label', name)
resultElement.textContent = unicode
fragment.appendChild(resultElement)
})
containerElement.appendChild(fragment)
}
function renderResults (emojiNameArray, containerElement) {
containerElement.innerHTML = ''
var fragment = document.createDocumentFragment()
var modifierValue = preference['skin-tone-modifier']
var modifier = modifiers.indexOf(modifierValue) >= 0 ? modifierValue : null
emojiNameArray.forEach(function (name) {
var unicode = addModifier(emojilib[name], modifier) || '--'
var resultElement = document.createElement('button')
resultElement.type = 'button'
resultElement.className = 'emoji'
resultElement.setAttribute('aria-label', name)
resultElement.textContent = unicode
fragment.appendChild(resultElement)
})
containerElement.appendChild(fragment)
}