- From: Adam Rice <notifications@github.com>
- Date: Thu, 09 Jul 2020 16:40:08 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 9 July 2020 23:40:20 UTC
@ricea commented on this pull request. > + 1. Let |controller| be a [=new=] {{ReadableStreamDefaultController}}. + 1. Let |backpressurePromise| be [=a new promise=]. + 1. Add a handler for |port|'s {{MessagePort/message}} event with the following steps: + 1. Let |data| be the data of the message. + 1. If ! [$Type$](|data|) is not Object, return. + 1. Let |type| be ? [$Get$](|data|, `"type"`). + 1. Let |value| be ? [$Get$](|data|, `"value"`). + 1. If ! [$Type$](|type|) is not String, return. + 1. If |type| is `"chunk"`, + 1. If ! [$ReadableStreamDefaultControllerCanCloseOrEnqueue$](|controller|) is true, + 1. Perform ! [$ReadableStreamDefaultControllerEnqueue$](|controller|, |value|). + 1. [=Resolve=] |backpressurePromise| with undefined. + 1. Set |backpressurePromise| to [=a new promise=]. + 1. Otherwise, if |type| is `"close"`, + 1. Perform ! [$ReadableStreamDefaultControllerClose$](|controller|). + 1. Disentangle |port|. Yes, I was confused when I didn't find a definition. -- 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/streams/pull/1053#discussion_r452547039
Received on Thursday, 9 July 2020 23:40:20 UTC