How can I use an async function run() with eventListener and onClick?
My setup is as follows:
document.addEventListener("click", function () {
document.getElementById("t-load").onclick = function () {
await run();
};
});
I get multiple errors swapping in an out async, await, etc.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/pRFQt4i
Comments
Post a Comment