This repository has been archived on 2019-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
2017-12-05 00:13:47 +01:00

15 lines
492 B
JavaScript

export default function appendNewPopper(id, text, container) {
const jasmineWrapper = document.getElementById('jasmineWrapper');
const popper = document.createElement('div');
popper.id = id;
popper.className = 'popper';
popper.textContent = text || 'popper';
const arrow = document.createElement('div');
arrow.className = 'popper__arrow';
arrow.setAttribute('x-arrow', '');
popper.appendChild(arrow);
(container || jasmineWrapper).appendChild(popper);
return popper;
}