Skip to content

Commit 5c6fc51

Browse files
committed
Integrate with Streams in the correct way
1 parent df6786a commit 5c6fc51

File tree

1 file changed

+30
-14
lines changed

1 file changed

+30
-14
lines changed

source

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4610,6 +4610,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
46104610
</ul>
46114611
</dd>
46124612

4613+
<dt>Streams</dt>
4614+
<dd>
4615+
<p>The following terms are defined in <cite>Streams</cite>: <ref>STREAMS</ref></p>
4616+
4617+
<ul class="brief">
4618+
<li><dfn data-x-href="https://streams.spec.whatwg.org/#writablestream"><code>WritableStream</code></dfn></li>
4619+
<li><dfn data-x-href="https://streams.spec.whatwg.org/#writablestream-set-up" for="WritableStream">set up</dfn> a newly-<span data-x="new">created-via-Web IDL</span> <code>WritableStream</code></li>
4620+
<li><dfn data-x-href="https://streams.spec.whatwg.org/#abort-a-writable-stream" for="WritableStream">abort</dfn> a <code>WritableStream</code></li>
4621+
</ul>
4622+
</dd>
4623+
46134624
<dt>Web App Manifest</dt>
46144625

46154626
<dd>
@@ -124396,7 +124407,9 @@ dictionary <dfn dictionary>StreamHTMLUnsafeOptions</dfn> {
124396124407

124397124408
<li><p>If <var>disposition</var> is not "Allowed", throw a TypeError.</p></li>
124398124409

124399-
<li><p>Let <var>writable</var> be a new WritableStream.</p></li>
124410+
<li><p><span data-x="concept-node-remove">Remove</span> all <var>context</var>'s <span
124411+
data-x="concept-tree-child">children</span>, in <span>tree order</span>, with the <i>suppress
124412+
observers flag</i> set.</p></li>
124400124413

124401124414
<li>
124402124415
<p>Let <var>parser</var> be an <span>HTML parser</span> using the <span>HTML fragment parsing
@@ -124421,31 +124434,31 @@ dictionary <dfn dictionary>StreamHTMLUnsafeOptions</dfn> {
124421124434
configure <var>parser</var> to set <span>already started</span> to false for <code>script</code> elements
124422124435
before they are inserted.</p></li>
124423124436

124424-
<li><p>Return <var>writable</var> and continue running the remaining steps <span>in parallel</span>.</p></li>
124425-
124426-
<li>
124427-
<p>When <var>writable</var> is first locked to a writer, remove all child nodes of
124428-
<var>context</var> in <span>tree order</span>.</p>
124429-
124430-
<p class="XXX">Is this is exactly the right timing for removing children? Is it correct to do nothing
124431-
the second time a writer is locked?</p>
124432-
</li>
124433-
124434124437
<li>
124435-
<p>For every <var>chunk</var> that is written to <var>writable</var>:</p>
124438+
<p>Let <var>writeAlgorithm</var> be an algorithm which takes a <var>chunk</var> argument and
124439+
runs the following steps:</p>
124436124440

124437124441
<ol>
124438-
<li><p>Set <var>input</var> to the stringification of <var>chunk</var>. If this throws, abort
124439-
<var>writable</var> and abort these steps.</p></li>
124442+
<li><p>Set <var>input</var> to the stringification of <var>chunk</var>. If this throws an
124443+
exception, return <span>a promise rejected with</span> that exception.</p></li>
124440124444

124441124445
<li>Place the <var>input</var> into the <span>input stream</span> of <var>parser</var>. The
124442124446
encoding <span data-x="concept-encoding-confidence">confidence</span> is
124443124447
<i>irrelevant</i>.</li>
124444124448

124445124449
<li><p>Let <var>parser</var> run until it has consumed all the characters just inserted into
124446124450
the input stream.</p></li>
124451+
124452+
<li><p>Return <span>a promise resolved with</span> undefined.<p></li>
124447124453
</ol>
124448124454
</li>
124455+
124456+
<li><p>Let <var>writable</var> be a <span>new</span> <code>WritableStream</code> in
124457+
<span data-x="concept-incumbent-realm">incumbent realm</span>.</p></li>
124458+
124459+
<li><p><span>Set up</span> <var>writable</var> with <var>writeAlgorithm</var>.</p></li>
124460+
124461+
<li><p>Return <var>writable</var>.</p></li>
124449124462
</ol>
124450124463
</div>
124451124464

@@ -155737,6 +155750,9 @@ INSERT INTERFACES HERE
155737155750
<dt id="refsSTORAGE">[STORAGE]</dt>
155738155751
<dd><cite><a href="https://storage.spec.whatwg.org/">Storage</a></cite>, A. van Kesteren. WHATWG.</dd>
155739155752

155753+
<dt id="refsSTREAMS">[STREAMS]</dt>
155754+
<dd><cite><a href="https://streams.spec.whatwg.org/">Streams</a></cite>, A. Rice, D. Denicola, M. Buelens, T. Yoshino. WHATWG.</dd>
155755+
155740155756
<dt id="refsSVG">[SVG]</dt>
155741155757
<dd><cite><a href="https://svgwg.org/svg2-draft/">Scalable Vector Graphics (SVG) 2</a></cite>, N Andronikos, R. Atanassov, T. Bah, B. Birtles, B. Brinza, C. Concolato, E. Dahlström, C. Lilley, C. McCormack, D. Schepers, R. Schwerdtfeger, D. Storey, S. Takagi, J. Watt. W3C.</dd>
155742155758

0 commit comments

Comments
 (0)