Re: [heycam/webidl] Proposal: DOMException.ignoreAborts(promise) (#933)

@bathos, your example would be rewritten as follows:

```js
async butterBiscuits({ signal }) {
  try {
    const result = await DOMException.ignoreAborts(fetch('https://butternet/the-good-stuff?lots', { signal }));
    if (result) {
      this.biscuits.butter = result;
    }
  } catch (err) {
    alerts.push('a TERRIBLE thing happened');
    throw err;
  }
}
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/933#issuecomment-719661369

Received on Friday, 30 October 2020 16:38:30 UTC