[whatwg/webidl] Why do Readers and Writers have constructors? (Issue #1636)

saschanaz created an issue (whatwg/webidl#1636)

### What is the issue with the Web IDL Standard?

There are usually created by getReader and getWriter, but they also have public constructors that receives streams.

The spec says it's just equivalent to getReader/Writer but it can lead to weird lifecycle situation where the reader is from a different realm than the stream's:

```js
new ReadableStreamDefaultReader(new window.open().ReadableStream());
```

This makes Gecko do extra works here and there, but I wonder it's worth at all?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1636
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/1636@github.com>

Received on Thursday, 10 September 2026 16:30:44 UTC