progress = async max => {
const element = html`<progress value=0 width=${width}>`
let count = 0
const counter = setInterval(() => {
if (count === max) {
return clearInterval(count)
}
++count
element.value = count/max
element.dispatchEvent(new CustomEvent('input'))
}, 300)
return element
}