export function show(elements: Element[]): void { document.body.innerHTML = '' elements.forEach(element => document.body.appendChild(element)) } /* Trigger animation in any case. * * Trigger reflow between removing and adding the classname. * See https://css-tricks.com/restart-css-animation/ */ export function triggerAnimation(element: HTMLElement, animation: string) { element.classList.remove(animation) void element.offsetWidth element.classList.add(animation) }