Skip to content

Commit aa1c505

Browse files
authored
Editorial: cleanup "create an element"
While here we also teach the remaining "enqueue a custom element callback reaction" callers about lists. Corresponding DOM PR: whatwg/dom#1331.
1 parent f23f559 commit aa1c505

File tree

1 file changed

+41
-43
lines changed

1 file changed

+41
-43
lines changed

source

Lines changed: 41 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11328,8 +11328,8 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
1132811328

1132911329
<ol>
1133011330
<li><p>Let <var>element</var> be the result of <span data-x="create an element">creating an
11331-
element</span> given the <span>document element</span>'s <span>node document</span>, <code
11332-
data-x="SVG title">title</code>, and the <span>SVG namespace</span>.</p>
11331+
element</span> given the <span>document element</span>'s <span>node document</span>, "<code
11332+
data-x="">title</code>", and the <span>SVG namespace</span>.</p>
1133311333

1133411334
<li><p>Insert <var>element</var> as the <span>first child</span> of the <span>document
1133511335
element</span>.</p></li>
@@ -11354,8 +11354,8 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
1135411354

1135511355
<ol>
1135611356
<li><p>Let <var>element</var> be the result of <span data-x="create an element">creating an
11357-
element</span> given the <span>document element</span>'s <span>node document</span>,
11358-
<code>title</code>, and the <span>HTML namespace</span>.</p>
11357+
element</span> given the <span>document element</span>'s <span>node document</span>, "<code
11358+
data-x="">title</code>", and the <span>HTML namespace</span>.</p>
1135911359

1136011360
<li><p><span data-x="concept-node-append">Append</span> <var>element</var> to <span>the
1136111361
<code>head</code> element</span>.</p></li>
@@ -14717,8 +14717,8 @@ interface <dfn interface>DOMStringMap</dfn> {
1471714717
<li><p>Advance <var>position</var> to the next code point in <var>input</var>.</p></li>
1471814718

1471914719
<li><p><span data-x="concept-node-append">Append</span> the result of <span data-x="create an
14720-
element">creating an element</span> given <var>document</var>, <code>br</code>, and the
14721-
<span>HTML namespace</span> to <var>fragment</var>.</p></li>
14720+
element">creating an element</span> given <var>document</var>, "<code data-x="">br</code>",
14721+
and the <span>HTML namespace</span> to <var>fragment</var>.</p></li>
1472214722
</ol>
1472314723
</li>
1472414724
</ol>
@@ -29917,7 +29917,7 @@ img.decode().then(() => {
2991729917
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>
2991829918

2991929919
<li><p>Let <var>img</var> be the result of <span data-x="create an element">creating an
29920-
element</span> given <var>document</var>, <code>img</code>, and the <span>HTML
29920+
element</span> given <var>document</var>, "<code data-x="">img</code>", and the <span>HTML
2992129921
namespace</span>.</p></li>
2992229922

2992329923
<li><p>If <var>width</var> is given, then <span data-x="concept-element-attributes-set-value">set
@@ -35450,7 +35450,7 @@ interface <dfn interface>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span>
3545035450
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>
3545135451

3545235452
<li><p>Let <var>audio</var> be the result of <span data-x="create an element">creating an
35453-
element</span> given <var>document</var>, <code>audio</code>, and the <span>HTML
35453+
element</span> given <var>document</var>, "<code data-x="">audio</code>", and the <span>HTML
3545435454
namespace</span>.</p></li>
3545535455

3545635456
<li><p><span data-x="concept-element-attributes-set-value">Set an attribute value</span> for
@@ -43565,8 +43565,8 @@ interface <dfn interface>HTMLTableSectionElement</dfn> : <span>HTMLElement</span
4356543565
<span>"<code>IndexSizeError</code>"</span> <code>DOMException</code>.</p></li>
4356643566

4356743567
<li><p>Let <var>table row</var> be the result of <span data-x="create an element">creating an
43568-
element</span> given this element's <span>node document</span>, <code>tr</code>, and the
43569-
<span>HTML namespace</span>.</p></li>
43568+
element</span> given this element's <span>node document</span>, "<code data-x="">tr</code>", and
43569+
the <span>HTML namespace</span>.</p></li>
4357043570

4357143571
<li><p>If <var>index</var> is &#x2212;1 or equal to the number of items in the <code
4357243572
data-x="dom-tbody-rows">rows</code> collection, then <span
@@ -43843,8 +43843,8 @@ interface <dfn interface>HTMLTableRowElement</dfn> : <span>HTMLElement</span> {
4384343843
<span>"<code>IndexSizeError</code>"</span> <code>DOMException</code>.</p></li>
4384443844

4384543845
<li><p>Let <var>table cell</var> be the result of <span data-x="create an element">creating an
43846-
element</span> given this <code>tr</code> element's <span>node document</span>, <code>td</code>,
43847-
and the <span>HTML namespace</span>.</p></li>
43846+
element</span> given this <code>tr</code> element's <span>node document</span>, "<code
43847+
data-x="">td</code>", and the <span>HTML namespace</span>.</p></li>
4384843848

4384943849
<li><p>If <var>index</var> is equal to &#x2212;1 or equal to the number of items in <code
4385043850
data-x="dom-tr-cells">cells</code> collection, then <span
@@ -54675,7 +54675,7 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
5467554675
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>
5467654676

5467754677
<li><p>Let <var>option</var> be the result of <span data-x="create an element">creating an
54678-
element</span> given <var>document</var>, <code>option</code>, and the <span>HTML
54678+
element</span> given <var>document</var>, "<code data-x="">option</code>", and the <span>HTML
5467954679
namespace</span>.</p></li>
5468054680

5468154681
<li><p>If <var>text</var> is not the empty string, then append to <var>option</var> a new
@@ -72482,7 +72482,7 @@ document.body.append(parent);
7248272482
<p>The <span data-x="concept-form-reset-control">reset algorithm</span> for <span
7248372483
data-x="form-associated custom element">form-associated custom elements</span> is to <span>enqueue
7248472484
a custom element callback reaction</span> with the element, callback name "<code
72485-
data-x="">formResetCallback</code>", and an empty argument list.</p>
72485+
data-x="">formResetCallback</code>", and « ».</p>
7248672486

7248772487
<hr>
7248872488

@@ -73113,13 +73113,12 @@ customElements.define("x-foo", class extends HTMLElement {
7311373113

7311473114
<li><p>For each <var>attribute</var> in <var>element</var>'s <span>attribute list</span>, in
7311573115
order, <span>enqueue a custom element callback reaction</span> with <var>element</var>, callback
73116-
name "<code data-x="">attributeChangedCallback</code>", and an argument list containing
73117-
<var>attribute</var>'s local name, null, <var>attribute</var>'s value, and <var>attribute</var>'s
73118-
namespace.</p></li>
73116+
name "<code data-x="">attributeChangedCallback</code>", and « <var>attribute</var>'s local name,
73117+
null, <var>attribute</var>'s value, <var>attribute</var>'s namespace ».</p></li>
7311973118

7312073119
<li><p>If <var>element</var> is <span>connected</span>, then <span>enqueue a custom element
7312173120
callback reaction</span> with <var>element</var>, callback name "<code
73122-
data-x="">connectedCallback</code>", and an empty argument list.</p></li>
73121+
data-x="">connectedCallback</code>", and « ».</p></li>
7312373122

7312473123
<li><p>Add <var>element</var> to the end of <var>definition</var>'s <span
7312573124
data-x="concept-custom-element-definition-construction-stack">construction stack</span>.</p></li>
@@ -73788,15 +73787,14 @@ dictionary <dfn dictionary>ValidityStateFlags</dfn> {
7378873787
element</span>'s <span data-x="face-state">state</span>, for example <span data-x="restore
7378973788
persisted state">after navigation</span> or restarting the user agent, they may <span>enqueue a
7379073789
custom element callback reaction</span> with that element, callback name "<code
73791-
data-x="">formStateRestoreCallback</code>", an argument list containing the state to be
73792-
restored, and "<code data-x="">restore</code>".</p>
73790+
data-x="">formStateRestoreCallback</code>", and « the state to be restored, "<code
73791+
data-x="">restore</code>" ».</p>
7379373792

73794-
<p>If the user agent has a form-filling assist feature, then when the feature is invoked,
73795-
it may <span>enqueue a custom element callback reaction</span> with
73796-
a <span>form-associated custom element</span>, callback name
73797-
"<code data-x="">formStateRestoreCallback</code>", an argument list containing the state value
73798-
determined by history of state value and some heuristics, and
73799-
"<code data-x="">autocomplete</code>".</p>
73793+
<p>If the user agent has a form-filling assist feature, then when the feature is invoked, it may
73794+
<span>enqueue a custom element callback reaction</span> with a <span>form-associated custom
73795+
element</span>, callback name "<code data-x="">formStateRestoreCallback</code>", and « the state
73796+
value determined by history of state value and some heuristics, "<code
73797+
data-x="">autocomplete</code>" ».</p>
7380073798

7380173799
<p>In general, the <span data-x="face-state">state</span> is information specified by a user, and
7380273800
the <span data-x="face-submission-value">submission value</span> is a value after canonicalization
@@ -104969,15 +104967,15 @@ new PaymentRequest(&hellip;); // Allowed to use
104969104967

104970104968
<ol>
104971104969
<li><p>Let <var>html</var> be the result of <span data-x="create an element">creating an
104972-
element</span> given <var>document</var>, <code>html</code>, and the <span>HTML
104970+
element</span> given <var>document</var>, "<code data-x="">html</code>", and the <span>HTML
104973104971
namespace</span>.</p></li>
104974104972

104975104973
<li><p>Let <var>head</var> be the result of <span data-x="create an element">creating an
104976-
element</span> given <var>document</var>, <code>head</code>, and the <span>HTML
104974+
element</span> given <var>document</var>, "<code data-x="">head</code>", and the <span>HTML
104977104975
namespace</span>.</p></li>
104978104976

104979104977
<li><p>Let <var>body</var> be the result of <span data-x="create an element">creating an
104980-
element</span> given <var>document</var>, <code>body</code>, and the <span>HTML
104978+
element</span> given <var>document</var>, "<code data-x="">body</code>", and the <span>HTML
104981104979
namespace</span>.</p></li>
104982104980

104983104981
<li><p><span data-x="concept-node-append">Append</span> <var>html</var> to
@@ -115040,7 +115038,8 @@ enum <dfn enum>DOMParserSupportedType</dfn> {
115040115038

115041115039
<li><p>If <var>parent</var> is a <code>DocumentFragment</code>, set <var>parent</var> to the
115042115040
result of <span data-x="create an element">creating an element</span> given <span>this</span>'s
115043-
<span>node document</span>, <code>body</code>, and the <span>HTML namespace</span>.</p></li>
115041+
<span>node document</span>, "<code data-x="">body</code>", and the <span>HTML
115042+
namespace</span>.</p></li>
115044115043

115045115044
<li><p>Let <var>fragment</var> be the result of invoking the <span>fragment parsing algorithm
115046115045
steps</span> given <var>parent</var> and <var>compliantString</var>.</p></li>
@@ -115141,8 +115140,8 @@ enum <dfn enum>DOMParserSupportedType</dfn> {
115141115140
</ul>
115142115141

115143115142
<p>set <var>context</var> to the result of <span data-x="create an element">creating an
115144-
element</span> given <span>this</span>'s <span>node document</span>, <code>body</code>, and
115145-
the <span>HTML namespace</span>.</p>
115143+
element</span> given <span>this</span>'s <span>node document</span>, "<code
115144+
data-x="">body</code>", and the <span>HTML namespace</span>.</p>
115146115145
</li>
115147115146

115148115147
<li>
@@ -115254,8 +115253,8 @@ enum <dfn enum>DOMParserSupportedType</dfn> {
115254115253
</ul>
115255115254

115256115255
<p>then set <var>element</var> to the result of <span data-x="create an element">creating an
115257-
element</span> given <span>this</span>'s <span>node document</span>, <code>body</code>, and the
115258-
<span>HTML namespace</span>.</p>
115256+
element</span> given <span>this</span>'s <span>node document</span>, "<code
115257+
data-x="">body</code>", and the <span>HTML namespace</span>.</p>
115259115258
</li>
115260115259

115261115260
<li><p>Let <var>fragment node</var> be the result of invoking the <span>fragment parsing
@@ -129198,12 +129197,12 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
129198129197
definition">looking up a custom element definition</span> given <var>document</var>, <var>given
129199129198
namespace</var>, <var>local name</var>, and <var>is</var>.</p></li>
129200129199

129201-
<li><p>If <var>definition</var> is non-null and the parser was not created as part of the
129202-
<span>HTML fragment parsing algorithm</span>, then let <var>will execute script</var> be true.
129203-
Otherwise, let it be false.</p></li>
129200+
<li><p>Let <var>willExecuteScript</var> be true if <var>definition</var> is non-null and the
129201+
parser was not created as part of the <span>HTML fragment parsing algorithm</span>; otherwise
129202+
false.</p></li>
129204129203

129205129204
<li>
129206-
<p>If <var>will execute script</var> is true, then:</p>
129205+
<p>If <var>willExecuteScript</var> is true:</p>
129207129206

129208129207
<ol>
129209129208
<li><p>Increment <var>document</var>'s <span>throw-on-dynamic-markup-insertion
@@ -129219,12 +129218,11 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
129219129218

129220129219
<li>
129221129220
<p>Let <var>element</var> be the result of <span data-x="create an element">creating an
129222-
element</span> given <var>document</var>, <var>localName</var>, <var>given
129223-
namespace</var>, null, and <var>is</var>. If <var>will execute script</var> is true, set the
129224-
<var>synchronous custom elements flag</var>; otherwise, leave it unset.</p>
129221+
element</span> given <var>document</var>, <var>localName</var>, <var>given namespace</var>,
129222+
null, <var>is</var>, and <var>willExecuteScript</var>.</p>
129225129223

129226129224
<p class="note">This will cause <span data-x="custom element constructor">custom element
129227-
constructors</span> to run, if <var>will execute script</var> is true. However, since we
129225+
constructors</span> to run, if <var>willExecuteScript</var> is true. However, since we
129228129226
incremented the <span>throw-on-dynamic-markup-insertion counter</span>, this cannot cause <span
129229129227
data-x="dom-document-write">new characters to be inserted into the tokenizer</span>, or <span
129230129228
data-x="dom-document-open">the document to be blown away</span>.</p>
@@ -129245,7 +129243,7 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
129245129243
</li>
129246129244

129247129245
<li>
129248-
<p>If <var>will execute script</var> is true, then:</p>
129246+
<p>If <var>willExecuteScript</var> is true:</p>
129249129247

129250129248
<ol>
129251129249
<li><p>Let <var>queue</var> be the result of popping from <var>document</var>'s <span>relevant

0 commit comments

Comments
 (0)