Skip to content
Open
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
17 changes: 11 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -57526,15 +57526,15 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
</div>

<div algorithm>
<p>To get the <dfn><code>option</code> element nearest ancestor <code>select</code></dfn> given an
<code>option</code> <var>option</var>, run these steps. They return a <code>select</code> or
null.</p>
<p>To get the <dfn data-x="option element nearest ancestor select">nearest ancestor
<code>select</code></dfn> given an <code>Element</code> <var>element</var>, run these steps. They
return a <code>select</code> or null.</p>

<ol>
<li><p>Let <var>ancestorOptgroup</var> be null.</p></li>

<li>
<p>For each <var>ancestor</var> of <var>option</var>'s <span data-x="ancestor">ancestors</span>,
<p>For each <var>ancestor</var> of <var>elements</var>'s <span data-x="ancestor">ancestors</span>,
in reverse <span>tree order</span>:</p>

<ol>
Expand Down Expand Up @@ -79215,9 +79215,14 @@ contradict people?

<li>a <code>textarea</code> element that is <span data-x="concept-fe-disabled">disabled</span></li>

<li>an <code>optgroup</code> element that has a <code data-x="attr-optgroup-disabled">disabled</code> attribute</li>
<li>an <code>optgroup</code> element that has a <code
data-x="attr-optgroup-disabled">disabled</code> attribute or whose <span data-x="option element
nearest ancestor select">nearest ancestor <code>select</code></span> is <span
data-x="concept-fe-disabled">disabled</span></li>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to generalize the nearest ancestor select algorithm for this to work as currently this results in a type error. You're handing an optgroup to something that wants an option.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I changed the parameter from option to element


<li>an <code>option</code> element that is <span data-x="concept-option-disabled">disabled</span></li>
<li>an <code>option</code> element that is <span data-x="concept-option-disabled">disabled</span>
or whose <span data-x="option element nearest ancestor select">nearest ancestor
<code>select</code></span> is <span data-x="concept-fe-disabled">disabled</span></li>

<li>a <code>fieldset</code> element that is a <span data-x="concept-fieldset-disabled">disabled fieldset</span></li>

Expand Down
Loading