This approach is more semantically aligned with what is meant to happen (wipe `prf` after it is broadcast, regardless of success or fail), and potentially better scheduling (previous approach allowed theoretical promises in the microtask queue injected after the `fetch` but before yielding to main thread?).
'Envpass-Challenge': challenge
},
body: prf
+ }).finally(() => {
+ prf.fill(0);
});
- prf.fill(0);
if (response.status === 200) {
p.textContent = 'Successfully sent passkey. You may close this window now.';
clearTimeout(timeoutId);