Re: [whatwg/streams] Align WritableStream structure with ReadableStream structure (#488)

>  
>      return this._closedPromise;
>    }
>  
> +  get desiredSize() {
> +    if (IsWritableStreamDefaultWriter(this) === false) {
> +      throw CreateWritableStreamDefaultWriterBrandCheckException('desiredSize');
> +    }
> +
> +    if (this._ownerWritableStream === undefined) {
> +      throw CreateWritableStreamDefaultWriterLockException('desiredSize');
> +    }
> +
> +    return WritableStreamDefaultWriterGetDesiredSize(this)
> +  }
> +
>    get ready() {

What if we changed ready() from a getter to a function, waitForDesiredSize() with no arguments? Then in the future we could upgrade it to allow arguments. But by default it waits for desiredSize >= highWaterMark.

---
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/488/files/dfa07172203b4c292cfb5a3fc88e821a1db7c3db#r73118105

Received on Tuesday, 2 August 2016 08:58:19 UTC