Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
activate: onActivate => {
button.classList.add(CLASS_CHANGING)
button.setAttribute('aria-expanded', 'true')
button.classList.add(CLASS_ACTIVE)
button.insertAdjacentElement('afterend', popover)
popover.style.maxWidth = `${document.body.clientWidth}px`
const contentMaxHeight = getStyle(content, 'maxHeight')
maxHeight = Math.round(pixels(contentMaxHeight, content))
if (typeof onActivate === 'function') {
onActivate(popover, button)
}
},