Re: [whatwg/streams] Introspection: disturbed or locked (#1105)

I agree with @domenic that we shouldn't add more conveniences around "disturbed".

I think, if I were to design the `Body` API today, I would have a `Body.stream()` method (mirroring `Blob.stream()`) instead of the `Body.body` property. Calling that method would immediately and unconditionally set `Body.bodyUsed` to `true`, so Fetch can manage that flag on its own without needing help from the Streams standard.

Unfortunately, we can't remove `Body.body` now, so we're stuck with it. But maybe we can recommend future standards which want to expose a `ReadableStream`, to prefer a `stream()` method in their API? That way, they can avoid needing to inspect the "disturbed" flag.

-- 
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/issues/1105#issuecomment-771210640

Received on Monday, 1 February 2021 22:42:26 UTC