- From: Domenic Denicola <notifications@github.com>
- Date: Fri, 17 May 2019 09:59:11 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/762/review/239032146@github.com>
domenic commented on this pull request.
> @@ -2427,10 +2427,8 @@ before a <var>child</var>, with an optional <i>suppress observers flag</i>, run
its <a for=range>end offset</a> by <var>count</var>.
</ol>
- <li>Let <var>nodes</var> be <var>node</var>'s
- <a>children</a> if <var>node</var> is
- a {{DocumentFragment}} <a>node</a>, and a
- list containing solely <var>node</var> otherwise.
+ <li><p>Let <var>nodes</var> be <var>node</var>'s <a>children</a>, if <var>node</var> is a
+ {{DocumentFragment}} <a>node</a>, « <var>node</var> » otherwise.
This reads really wrong; I'm not happy with where we've landed if this is what happens. Commas just don't work that way. Semicolon could work, or using a conjunction (either "and" or "or").
> @@ -2637,11 +2635,12 @@ To <dfn export for=Node id=concept-node-replace-all>replace all</dfn> with a
<li>Let <var>removedNodes</var> be <var>parent</var>'s
<a>children</a>.
- <li>Let <var>addedNodes</var> be the empty list if <var>node</var> is
- null, <var>node</var>'s <a>children</a> if
- <var>node</var> is a {{DocumentFragment}}
- <a>node</a>, and a list containing <var>node</var>
- otherwise.
+ <li><p>Let <var>addedNodes</var> be the empty list.
+
+ <li><p>If <var>node</var> is {{DocumentFragment}} <a>node</a>, then set <var>addedNodes</var> to
+ <var>node</var>'s <a>children</a>.
+
+ <li><p>Otherwise, if <var>node</var> is non-null, set <var>addedNodes</var> to « <var>node</var> ».
Yeah, this matches the code better. Nested ternaries are not great in either English or code, IMO. You could also use dl class="switch".
--
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/dom/pull/762#pullrequestreview-239032146
Received on Friday, 17 May 2019 16:59:34 UTC