@@ -67863,6 +67863,7 @@ not-slash = %x0000-002E / %x0030-10FFFF
6786367863 <dd><span data-x="concept-content-nothing">Nothing</span> (for clarification, <a href="#template-example">see example</a>).</dd>
6786467864 <dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
6786567865 <dd><span>Global attributes</span></dd>
67866+ <dd><code data-x="attr-template-contentmethod">contentmethod</code></dd>
6786667867 <dd><code data-x="attr-template-shadowrootmode">shadowrootmode</code></dd>
6786767868 <dd><code data-x="attr-template-shadowrootdelegatesfocus">shadowrootdelegatesfocus</code></dd>
6786867869 <dd><code data-x="attr-template-shadowrootclonable">shadowrootclonable</code></dd>
@@ -67879,6 +67880,7 @@ interface <dfn interface>HTMLTemplateElement</dfn> : <span>HTMLElement</span> {
6787967880 [<span>HTMLConstructor</span>] constructor();
6788067881
6788167882 readonly attribute <span>DocumentFragment</span> <span data-x="dom-template-content">content</span>;
67883+ [<span>CEReactions</span>] attribute DOMString <span data-x="dom-template-contentmethod">contentMethod</span>;
6788267884 [<span>CEReactions</span>] attribute DOMString <span data-x="dom-template-shadowrootmode">shadowRootMode</span>;
6788367885 [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLTemplateElement" data-x="dom-template-shadowrootdelegatesfocus">shadowRootDelegatesFocus</dfn>;
6788467886 [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLTemplateElement" data-x="dom-template-shadowrootclonable">shadowRootClonable</dfn>;
@@ -67894,6 +67896,40 @@ interface <dfn interface>HTMLTemplateElement</dfn> : <span>HTMLElement</span> {
6789467896
6789567897 <p>In a rendering, the <code>template</code> element <span>represents</span> nothing.</p>
6789667898
67899+ <p>The <dfn element-attr for="template"><code
67900+ data-x="attr-template-contentmethod">contentmethod</code></dfn> content attribute is an
67901+ <span>enumerated attribute</span> with the following keywords and states:</p>
67902+
67903+ <table>
67904+ <thead>
67905+ <tr>
67906+ <th>Keyword
67907+ <th>State
67908+ <th>Brief description
67909+ <tbody>
67910+ <tr>
67911+ <td><dfn attr-value for="template/contentmethod"><code data-x="attr-contentmethod-replace">replace</code></dfn>
67912+ <td><dfn data-x="attr-contentmethod-replace-state">Replace</dfn>
67913+ <td>Replace the target element itself.
67914+ <tr>
67915+ <td><dfn attr-value for="template/contentmethod"><code data-x="attr-contentmethod-replace-children">replace-children</code></dfn>
67916+ <td><dfn data-x="attr-contentmethod-replace-children-state">Replace Children</dfn>
67917+ <td>Replace the children of the target element.
67918+ <tr>
67919+ <td><dfn attr-value for="template/contentmethod"><code data-x="attr-contentmethod-append">append</code></dfn>
67920+ <td><dfn data-x="attr-contentmethod-append-state">Append</dfn>
67921+ <td>Append after the target element.
67922+ <tr>
67923+ <td><dfn attr-value for="template/contentmethod"><code data-x="attr-contentmethod-prepend">prepend</code></dfn>
67924+ <td><dfn data-x="attr-contentmethod-prepend-state">Prepend</dfn>
67925+ <td>Prepend before the target element.
67926+ </table>
67927+
67928+ <p>The <code data-x="attr-template-contentmethod">contentmethod</code> attribute's <i
67929+ data-x="invalid value default">invalid value default</i> and <i data-x="missing value
67930+ default">missing value default</i> are both the <dfn
67931+ data-x="attr-contentmethod-none-state">None</dfn> state.</p>
67932+
6789767933 <p>The <dfn element-attr for="template"><code
6789867934 data-x="attr-template-shadowrootmode">shadowrootmode</code></dfn> content attribute is an
6789967935 <span>enumerated attribute</span> with the following keywords and states:</p>
@@ -68075,6 +68111,13 @@ interface <dfn interface>HTMLTemplateElement</dfn> : <span>HTMLElement</span> {
6807568111 not a <code>ShadowRoot</code> node; otherwise null.</p>
6807668112 </div>
6807768113
68114+ <div algorithm>
68115+ <p>The <dfn attribute for="HTMLTemplateElement"><code
68116+ data-x="dom-template-contentmethod">contentMethod</code></dfn> IDL attribute must
68117+ <span>reflect</span> the <code data-x="attr-template-contentmethod">contentmethod</code> content
68118+ attribute, <span>limited to only known values</span>.</p>
68119+ </div>
68120+
6807868121 <div algorithm>
6807968122 <p>The <dfn attribute for="HTMLTemplateElement"><code
6808068123 data-x="dom-template-shadowrootmode">shadowRootMode</code></dfn> IDL attribute must
@@ -139403,6 +139446,10 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
139403139446 <var>element</var>:</p>
139404139447
139405139448 <ol>
139449+ <!-- Either here and before every other call to "adjusted insertion location", or maybe inside
139450+ "adjusted insertion location", adjust the insertion location based on contentmethod and the
139451+ first child element of the template. -->
139452+
139406139453 <li><p>Let the <var>adjusted insertion location</var> be the <span>appropriate place for
139407139454 inserting a node</span>.</p></li>
139408139455
@@ -140196,6 +140243,10 @@ document.body.appendChild(text);
140196140243 <p>If any of the following are false:</p>
140197140244
140198140245 <ul>
140246+ <li><var>templateStartTag</var>'s <code
140247+ data-x="attr-template-contentmethod">contentmethod</code> is not in the <span
140248+ data-x="attr-contentmethod-none-state">None</span> state;</li>
140249+
140199140250 <li><var>templateStartTag</var>'s <code
140200140251 data-x="attr-template-shadowrootmode">shadowrootmode</code> is not in the <span
140201140252 data-x="attr-shadowrootmode-none-state">None</span> state;</li>
@@ -140208,11 +140259,24 @@ document.body.appendChild(text);
140208140259 open elements</span>,</li>
140209140260 </ul>
140210140261
140211- <p>then <span>insert an HTML element</span> for the token.</p>
140262+ <p>then <span>insert an HTML element</span> for the token and return .</p>
140212140263 </li>
140213140264
140214140265 <li>
140215- <p>Otherwise:</p>
140266+ <p>If <var>templateStartTag</var>'s <code
140267+ data-x="attr-template-contentmethod">contentmethod</code> is not in the <span
140268+ data-x="attr-contentmethod-none-state">None</span> state:</p>
140269+
140270+ <ol>
140271+ <li><p>TODO</p></li>
140272+ </ol>
140273+ </li>
140274+
140275+ <li>
140276+ <!-- TODO: is it OK if both of these branches run? If not, which one wins? -->
140277+ <p>If <var>templateStartTag</var>'s <code
140278+ data-x="attr-template-shadowrootmode">shadowrootmode</code> is not in the <span
140279+ data-x="attr-shadowrootmode-none-state">None</span> state:</p>
140216140280
140217140281 <ol>
140218140282 <li><p>Let <var>declarativeShadowHostElement</var> be <span>adjusted current
@@ -152714,6 +152778,19 @@ interface <dfn interface>External</dfn> {
152714152778 <td> Whether the element is editable
152715152779 <td> "<code data-x="">true</code>"; "<code data-x="">plaintext-only</code>";
152716152780 "<code data-x="">false</code>"
152781+ <tr>
152782+ <th> <code data-x="">contentmethod</code>
152783+ <td> <code data-x="attr-template-contentmethod">template</code>
152784+ <td> Enables out-of-order streaming <!-- TODO better words -->
152785+ <td> "<code data-x="attr-contentmethod-replace">replace</code>";
152786+ "<code data-x="attr-contentmethod-replace-children">replace-children</code>";
152787+ "<code data-x="attr-contentmethod-append">append</code>";
152788+ "<code data-x="attr-contentmethod-prepend">prepend</code>"
152789+ <tr>
152790+ <th> <code data-x="">contentname</code>
152791+ <td> <span data-x="attr-id">HTML elements</span>
152792+ <td> Unique string to target what contentmethod affects <!-- TODO better words -->
152793+ <td> <a href="#attribute-text">Text</a>*
152717152794 <tr>
152718152795 <th> <code data-x="">controls</code>
152719152796 <td> <code data-x="attr-media-controls">audio</code>;
0 commit comments