Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 47 additions & 35 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -3422,6 +3422,12 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<dfn data-x="concept-range-bp" data-x-href="https://dom.spec.whatwg.org/#concept-range-bp">boundary point</dfn> as applied to ranges.</li>

<li>The <dfn data-x="create an element" data-x-href="https://dom.spec.whatwg.org/#concept-create-element">create an element</dfn> algorithm</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#create-a-document">create a document</dfn>,
<dfn data-x-href="https://dom.spec.whatwg.org/#create-a-text-node">create a text node</dfn>,
<dfn data-x-href="https://dom.spec.whatwg.org/#create-a-doctype">create a doctype</dfn>,
<dfn data-x-href="https://dom.spec.whatwg.org/#create-a-comment-node">create a comment node</dfn>,
<dfn data-x-href="https://dom.spec.whatwg.org/#create-a-processing-instruction-node">create a processing instruction node</dfn>, and
<dfn data-x-href="https://dom.spec.whatwg.org/#create-a-document-fragment">create a document fragment</dfn> algorithms</li>
<li>The <dfn data-x="element interface" data-x-href="https://dom.spec.whatwg.org/#concept-element-interface">element interface</dfn> concept</li>
<li>The concepts of <dfn data-x-href="https://dom.spec.whatwg.org/#concept-element-custom-element-state">custom element state</dfn>, and of
<dfn data-x="concept-element-defined" data-x-href="https://dom.spec.whatwg.org/#concept-element-defined">defined</dfn> and
Expand Down Expand Up @@ -10020,8 +10026,9 @@ interface <dfn interface>HTMLOptionsCollection</dfn> : <span>HTMLCollection</spa
<var>select</var> given a non-negative integer <var>count</var>:</p>

<ol>
<li><p>Let <var>fragment</var> be a new <code>DocumentFragment</code> whose <span>node
document</span> is <var>select</var>'s <span>node document</span>.</p></li>
<li><p>Let <var>fragment</var> be the result of <span data-x="create a document fragment">creating
a document fragment</span> given <var>select</var>'s <span>node
document</span>.</p></li>

<li><p>Append <var>count</var> new <code>option</code> elements to <var>fragment</var>.</p></li>

Expand Down Expand Up @@ -15880,8 +15887,8 @@ interface <dfn interface>DOMStringMap</dfn> {
<code>Document</code> <var>document</var> is the result of running the following steps:</p>

<ol>
<li><p>Let <var>fragment</var> be a new <code>DocumentFragment</code> whose <span>node
document</span> is <var>document</var>.</p></li>
<li><p>Let <var>fragment</var> be the result of <span data-x="create a document fragment">creating
a document fragment</span> given <var>document</var>.</p></li>

<li><p>Let <var>position</var> be a <span>position variable</span> for <var>input</var>,
initially pointing at the start of <var>input</var>.</p></li>
Expand Down Expand Up @@ -60403,8 +60410,9 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
<var>selectedcontent</var>:</p>

<ol>
<li><p>Let <var>documentFragment</var> be a new <code>DocumentFragment</code> whose <span>node
document</span> is <var>option</var>'s <span>node document</span>.</p></li>
<li><p>Let <var>documentFragment</var> be the result of <span data-x="create a document
fragment">creating a document fragment</span> given <var>option</var>'s <span>node
document</span>.</p></li>

<li>
<p>For each <var>child</var> of <var>option</var>'s <span
Expand Down Expand Up @@ -69346,9 +69354,11 @@ interface <dfn interface>HTMLTemplateElement</dfn> : <span>HTMLElement</span> {
document</dfn>:</p>

<ol>
<li><p>Let <var>newDocument</var> be a new <code>Document</code> (whose <span
data-x="concept-document-bc">browsing context</span> is null). This is "a
<code>Document</code> created by this algorithm" for the purposes of the step above.</p></li>
<li><p>Let <var>newDocument</var> be the result of <span data-x="create a document">creating
a document</span> that implements <code>Document</code>, given <var>document</var>'s <span
data-x="concept-relevant-realm">relevant realm</span>; its <span
data-x="concept-document-bc">browsing context</span> is null. This is "a <code>Document</code>
created by this algorithm" for the purposes of the step above.</p></li>

<li><p>If <var>document</var> is an <span data-x="HTML documents">HTML document</span>, then
mark <var>newDocument</var> as an <span data-x="HTML documents">HTML document</span>
Expand Down Expand Up @@ -127823,8 +127833,9 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
<li><p>Run the <span>inner sanitize steps</span> given <var>child</var>,
<var>configuration</var>, and <var>handleJavascriptNavigationUrls</var>.</p></li>

<li><p>Let <var>fragment</var> be a new <code>DocumentFragment</code> whose <span>node
document</span> is <var>node</var>'s <span>node document</span>.</p></li>
<li><p>Let <var>fragment</var> be the result of <span data-x="create a document
fragment">creating a document fragment</span> given <var>node</var>'s
<span>node document</span>.</p></li>

<li><p><span data-x="list iterate">For each</span> <var>innerChild</var> of
<var>child</var>'s <span data-x="concept-tree-child">children</span>, <span
Expand Down Expand Up @@ -144738,10 +144749,10 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
append <var>data</var> to that <code>Text</code> node's <span
data-x="concept-cd-data">data</span>.</p>

<p>Otherwise, create a new <code>Text</code> node whose <span
data-x="concept-cd-data">data</span> is <var>data</var> and whose <span>node document</span> is
the same as that of the element in which <var>insertionLocation</var> finds itself, and insert
the newly created node at <var>insertionLocation</var>.</p>
<p>Otherwise, let <var>text</var> be the result of <span data-x="create a text node">creating a
text node</span> given the <span>node document</span> of the element in which
<var>insertionLocation</var> finds itself and <var>data</var>, and insert <var>text</var> at
<var>insertionLocation</var>.</p>
</li>
</ol>
</div>
Expand Down Expand Up @@ -144802,11 +144813,11 @@ document.body.appendChild(text);
<li><p>Set <var>insertionLocation</var> to the <span>adjusted insertion location</span> given
<var>insertionLocation</var>.</p></li>

<li><p>Create a <code>Comment</code> node whose <code data-x="">data</code> attribute is set to
<var>data</var> and whose <span>node document</span> is the same as that of the node in which the
<var>insertionLocation</var> finds itself.</p>
<li><p>Let <var>comment</var> be the result of <span data-x="create a comment node">creating a
comment node</span> given the <span>node document</span> of the node in which the
<var>insertionLocation</var> finds itself and <var>data</var>.</p>

<li><p>Insert the newly created node at <var>insertionLocation</var>.</p></li>
<li><p>Insert <var>comment</var> at <var>insertionLocation</var>.</p></li>
</ol>
</div>

Expand All @@ -144825,12 +144836,12 @@ document.body.appendChild(text);
<li><p>Set <var>insertionLocation</var> to the <span>adjusted insertion location</span> given
<var>insertionLocation</var>.</p></li>

<li><p>Create a <code>ProcessingInstruction</code> node whose <span
data-x="concept-pi-target">target</span> is <var>target</var>, <span
data-x="concept-cd-data">data</span> is <var>data</var>, and <span>node document</span> is the
same as that of the node in which the <var>insertionLocation</var> finds itself.</p>
<li><p>Let <var>pi</var> be the result of <span data-x="create a processing instruction
node">creating a processing instruction node</span> given the <span>node document</span> of the
node in which the <var>insertionLocation</var> finds itself, <var>target</var>, and
<var>data</var>.</p>

<li><p>Insert the newly created node at <var>insertionLocation</var>.</p></li>
<li><p>Insert <var>pi</var> at <var>insertionLocation</var>.</p></li>
</ol>
</div>

Expand Down Expand Up @@ -144926,13 +144937,12 @@ document.body.appendChild(text);
identifier is not missing, or the token's system identifier is neither missing nor
"<code>about:legacy-compat</code>", then there is a <span>parse error</span>.</p>

<p>Append a <code>DocumentType</code> node to the <code>Document</code> node, with its <span
data-x="concept-doctype-name">name</span> set to the name given in the DOCTYPE token, or the
empty string if the name was missing; its <span data-x="concept-doctype-publicid">public
ID</span> set to the public identifier given in the DOCTYPE token, or the empty string if the
public identifier was missing; and its <span data-x="concept-doctype-systemid">system ID</span>
set to the system identifier given in the DOCTYPE token, or the empty string if the system
identifier was missing.</p>
<p>Let <var>doctype</var> be the result of <span data-x="create a doctype">creating a
doctype</span> given the <code>Document</code> node, the name given in the DOCTYPE token (or the
empty string if the name was missing), the public identifier given in the DOCTYPE token (or the
empty string if the public identifier was missing), and the system identifier given in the
DOCTYPE token (or the empty string if the system identifier was missing). Then append
<var>doctype</var> to the <code>Document</code> node.</p>

<p class="note">This also ensures that the <code>DocumentType</code> node is returned as the
value of the <code data-x="dom-Document-doctype">doctype</code> attribute of the
Expand Down Expand Up @@ -149736,8 +149746,9 @@ console.assert(container.firstChild instanceof SuperP);
<li><p>Set up the <span>HTML parser</span>'s <span>stack of open elements</span> so that it
contains just the single element <var>root</var>.</p></li>

<li><p>Let <var>fragment</var> be a new <code>DocumentFragment</code> whose <span>node
document</span> is <var>target</var>'s <span>node document</span>.</p></li>
<li><p>Let <var>fragment</var> be the result of <span data-x="create a document fragment">creating
a document fragment</span> given <var>target</var>'s <span>node
document</span>.</p></li>

<li><p>Set the parser's <span>root insertion target</span> to <var>fragment</var>.</p></li>

Expand Down Expand Up @@ -150152,8 +150163,9 @@ console.assert(container.firstChild instanceof SuperP);
element</span>'s <span
data-x="concept-tree-child">children</span>, in <span>tree order</span>.</p></li>

<li><p>Let <var>fragment</var> be a new <code>DocumentFragment</code> whose <span>node
document</span> is <var>context</var>'s <span>node document</span>.</p></li>
<li><p>Let <var>fragment</var> be the result of <span data-x="create a document fragment">creating
a document fragment</span> given <var>context</var>'s <span>node
document</span>.</p></li>

<li><p>For each <var>node</var> of <var>newChildren</var>, in <span>tree order</span>: <span
data-x="concept-node-append">append</span> <var>node</var> to <var>fragment</var>.</p></li>
Expand Down
Loading