- From: Noam Rosenthal <notifications@github.com>
- Date: Fri, 12 Jul 2024 04:58:05 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 12 July 2024 11:58:09 UTC
> How do you know "resolve" or "reject" is called from a task? That doesn't seem like a safe assumption. To be more specific, this is not about it being called from a task but rather being a script entry point (which is *usually* a task). We check for that in https://w3c.github.io/long-animation-frames/#create-script-entry-point step 6: only scripts that are at the bottom of the stack (which usually, but not always, means that they are a result of a task) are recorded. I guess though that this is a valid point as a spec can create a resolved promise and then react to it which would have the same effect. Perhaps a better place for this is [`HostEnqueuePromiseJob`](https://html.spec.whatwg.org/#hostenqueuepromisejob) but I would have to pass to it whether it's being resolved or rejected. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/webidl/pull/1400#issuecomment-2225429780 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/webidl/pull/1400/c2225429780@github.com>
Received on Friday, 12 July 2024 11:58:09 UTC