confusion about
form.onsubmit = function(ev) {
ev.preventDefault();
let res = await fetch(window.location.pathname, { method: 'POST', body: new FormData(form) });
if( res.ok )
window.location.reload();
else
alert("failed to send post");
return false; // i think needed as well as the preventDefault? not sure
}