Re: [heycam/webidl] Some things do not seem sound in “react to a Promise<T>” (#943)

@mkruisselbrink Yes, it looks like both the constructor operation and `createDelayed` are potential examples. If they were specified using both `upon fulfillment` and `upon rejection`, there’d be two observable conversions with potentially different results and failed conversion (either time) wouldn’t be handled by either set of steps. I’m guessing it wouldn’t actually end up implemented that way regardless of what the spec says, though.

@domenic I agree, I don’t see any reason for “upon rejection” to include the conversion. So if “upon rejection” were redefined as steps to be run if either the Promise state is rejected or if conversion in a corresponding “upon fulfillment” fails, it seems like that would be sufficient to make the behavior rational. It would imply a small change to how `respondWith` is specified — but currently what’s there doesn’t align with Web IDL anyway.

-- 
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/943#issuecomment-742487784

Received on Thursday, 10 December 2020 12:21:53 UTC