Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for optgroup removal #9434

Merged
merged 2 commits into from
Aug 25, 2023
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
13 changes: 11 additions & 2 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
</ol>

<p>The <span data-x="concept-node-remove-ext">removing steps</span> for the HTML Standard, given
<var>removedNode</var> and optionally <var>oldParent</var>, are defined as the following:</p>
<var>removedNode</var> and <var>oldParent</var>, are defined as the following:</p>

<ol>
<li><p>Let <var>document</var> be <var>removedNode</var>'s <span>node document</span>.</p></li>
Expand All @@ -1820,7 +1820,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
standard defines <span data-x="html element removing steps">HTML element removing steps</span>
for <var>removedNode</var>'s <span data-x="concept-element-local-name">local name</span>, then
run the corresponding <span>HTML element removing steps</span> given <var>removedNode</var> and
optionally <var>oldParent</var>.</p></li>
<var>oldParent</var>.</p></li>

<li>
<p>If <var>removedNode</var> is a <span>form-associated element</span> or the ancestor of a
Expand Down Expand Up @@ -52804,6 +52804,15 @@ interface <dfn interface>HTMLSelectElement</dfn> : <span>HTMLElement</span> {
<code>select</code> element's <span>selectedness setting algorithm</span>.</p></li>
</ol>

<p>The <code>optgroup</code> <span data-x="html element removing steps">HTML element removing
steps</span>, given <var>removedNode</var> and <var>oldParent</var>, are:</p>

<ol>
<li><p>If <var>oldParent</var> is a <code>select</code> element and <var>removedNode</var> has an
<var>option</var> child, then run <var>oldParent</var>'s <span>selectedness setting
algorithm</span>.</p></li>
</ol>

<p>If an <code>option</code> element in the <span data-x="concept-select-option-list">list of
options</span> <dfn data-x="ask for a reset">asks for a reset</dfn>, then run that
<code>select</code> element's <span>selectedness setting algorithm</span>.</p>
Expand Down