Skip to content

Commit e80a243

Browse files
authored
Make <option>'s form getter use the nearest ancestor select
Now that option elements can be any descendant of a select element, this algorithm needs to look higher than just its parent for a select element. Fixes #11708.
1 parent 63fab3f commit e80a243

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

source

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57287,14 +57287,17 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
5728757287
</div>
5728857288

5728957289
<div algorithm>
57290-
<p>The <dfn attribute for="HTMLOptionElement"><code data-x="dom-option-form">form</code></dfn> IDL
57291-
attribute's behavior depends on whether the <code>option</code> element is in a
57292-
<code>select</code> element or not. If the <code>option</code> has a <code>select</code> element
57293-
as its parent, or has an <code>optgroup</code> element as its parent and that
57294-
<code>optgroup</code> element has a <code>select</code> element as its parent, then the <code
57295-
data-x="dom-option-form">form</code> IDL attribute must return the same value as the <code
57296-
data-x="dom-fae-form">form</code> IDL attribute on that <code>select</code> element. Otherwise, it
57297-
must return null.</p>
57290+
<p>The <dfn attribute for="HTMLOptionElement"><code data-x="dom-option-form">form</code></dfn>
57291+
getter steps are:</p>
57292+
57293+
<ol>
57294+
<li><p>Let <var>select</var> be <span>this</span>'s <span><code>option</code> element nearest
57295+
ancestor <code>select</code></span>.</p></li>
57296+
57297+
<li><p>If <var>select</var> is null, then return null.</p></li>
57298+
57299+
<li><p>Return <var>select</var>'s <span>form owner</span>.</p></li>
57300+
</ol>
5729857301
</div>
5729957302

5730057303
<div algorithm>

0 commit comments

Comments
 (0)