Skip to content

Commit 4ce63af

Browse files
authored
Improve behavior for parsing option end tags
This moves the steps to clone an option element into a selectedcontent element from the parsing of an option end tag to a paragraph which specifies that this should happen any time an option is popped off the stack of open elements, which will make the algorithm run even if the author didn't explicitly write a closing option tag. Fixes #11653.
1 parent b3931e2 commit 4ce63af

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

source

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57212,6 +57212,12 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
5721257212
</ol>
5721357213
</div>
5721457214

57215+
<div algorithm>
57216+
<p>When an <code>option</code> element is popped off the <span>stack of open elements</span> of an
57217+
<span>HTML parser</span> or <span>XML parser</span>, the user agent must run <span>maybe clone an
57218+
option into selectedcontent</span> given the <code>option</code> element.</p>
57219+
</div>
57220+
5721557221
<dl class="domintro">
5721657222
<dt><code data-x=""><var>option</var>.<span subdfn data-x="dom-option-selected">selected</span></code></dt>
5721757223

@@ -141427,17 +141433,6 @@ document.body.appendChild(text);
141427141433
<p><span>Insert an HTML element</span> for the token.</p>
141428141434
</dd>
141429141435

141430-
<dt>An end tag whose tag name is "option"</dt>
141431-
<dd>
141432-
<p>Let <var>option</var> be the first <code>option</code> element in the <span>stack of open
141433-
elements</span>.</p>
141434-
141435-
<p>Run the steps for "any other end tag."</p>
141436-
141437-
<p>If <var>option</var> is no longer in the <span>stack of open elements</span>, then run
141438-
<span>maybe clone an option into selectedcontent</span> given <var>option</var>.</p>
141439-
</dd>
141440-
141441141436
<dt>A start tag whose tag name is one of: "rb", "rtc"</dt>
141442141437
<dd>
141443141438
<p>If the <span>stack of open elements</span> <span data-x="has an element in scope">has a

0 commit comments

Comments
 (0)