Re: [whatwg/streams] Editorial: add cross-links to internal slots (#1050)

@domenic commented on this pull request.



>   1. If |reader| is undefined, return false.
  1. If |reader| [=implements=] {{ReadableStreamDefaultReader}}, return true.
  1. Return false.
 </div>
 
 <h4 id="rs-reader-abstract-ops">Readers</h4>
 
+Instances of {{ReadableStreamDefaultReader}} and {{ReadableStreamBYOBReader}} are created with the
+internal slots described in the following table:

You can just expand it a bit. E.g. "In addition to the ones described in their individual sections, instances..."

> @@ -2401,14 +2405,31 @@ the {{ReadableStream}}'s public API.
  id="readable-stream-has-default-reader">ReadableStreamHasDefaultReader(|stream|)</dfn> performs the
  following steps:
 
- 1. Let |reader| be |stream|.\[[reader]].
+ 1. Let |reader| be |stream|.[=ReadableStream/[[reader]]=].
  1. If |reader| is undefined, return false.
  1. If |reader| [=implements=] {{ReadableStreamDefaultReader}}, return true.
  1. Return false.
 </div>
 
 <h4 id="rs-reader-abstract-ops">Readers</h4>

Seems good to me.

>   1. If |reader| is undefined, return false.
  1. If |reader| [=implements=] {{ReadableStreamDefaultReader}}, return true.
  1. Return false.
 </div>
 
 <h4 id="rs-reader-abstract-ops">Readers</h4>
 
+Instances of {{ReadableStreamDefaultReader}} and {{ReadableStreamBYOBReader}} are created with the
+internal slots described in the following table:
+
+<table dfn-for="ReadableStreamGenericReader">
+ <thead>
+  <tr>
+   <th>Internal Slot
+   <th>Description (<em>non-normative</em>)
+ <tbody>
+  <tr>
+   <td><dfn>\[[closedPromise]]</dfn>
+   <td class="non-normative">A promise returned by the reader's <code>closed</code> getter

If we don't go with interface mixin, I'd solve this by saying "A promise returned by the `defaultReader.closed` or `byobReader.closed` getter"

>     <td class="non-normative">A promise returned by the reader's
-   {{ReadableStreamDefaultReader/closed}} getter
+   {{ReadableStreamDefaultReader/closed}} getter.
+   This fulfills the [=ReadableStreamGenericReader/[[closedPromise]]=] contract.

There's a few ways to do this. I think it'd be best to delete the [[closedPromise]] and [[stream]] rows from this table, and then add a sentence after the table saying something like "They additionally have the internal slots described in the section XXX".

> @@ -1131,14 +1133,14 @@ to filling the [=readable stream=]'s [=internal queue=] or changing its state. I
  The <dfn id="default-reader-closed" attribute for="ReadableStreamDefaultReader">closed</dfn>
  getter steps are:
 
- 1. Return [=this=].\[[closedPromise]].
+ 1. Return [=this=].[=ReadableStreamDefaultReader/[[closedPromise]]=].

Yeah, per my above comment, if we're going to collapse them, then I think we'd best collapse them fully.

-- 
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/1050#discussion_r467251651

Received on Friday, 7 August 2020 20:23:47 UTC