- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 07 Sep 2021 12:21:21 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 7 September 2021 19:21:33 UTC
See https://github.com/WICG/app-history/issues/40 for background.
Basically, any time we convert an ES value to a `Promise<T>`, we should first check to see if it's a function. If so, we should call the function, and use its return value.
This allows code such as
```js
event.waitUntil((async () => {
// ...
})());
```
to become
```js
event.waitUntil(async () => {
// ...
});
```
This would be backward-compatible since there is no existing instances of `Promise<T>` where `T` is a callback function type, that are used as inputs.
--
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/1020
Received on Tuesday, 7 September 2021 19:21:33 UTC