Re: [whatwg/dom] Add AbortSignal.timeout(ms) (#951)

Would definitely be +1 on having this as proposed. It would be slightly better if we had ways of refreshing and canceling the timeout once created... e.g for example:

```js
const signal = AbortSignal.timeout(1000);

// wait a few milliseconds somehow... then reset the timout timer.

signal.timeout(1000);

// or cancel the timeout entirely and clear the internal timer
signal.timeout(0);
```

This would allow me to easily use this for idle-timeouts.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/951#issuecomment-970515484

Received on Tuesday, 16 November 2021 17:48:30 UTC