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

Update according to spec #29827

Closed
wants to merge 2 commits into from
Closed

Update according to spec #29827

wants to merge 2 commits into from

Conversation

danield770
Copy link

see https://html.spec.whatwg.org/#the-select-element Content model:
Zero or more option, optgroup, hr, and script-supporting elements.

Description

Motivation

Additional details

Related issues and pull requests

see https://html.spec.whatwg.org/#the-select-element
Content model:
Zero or more option, optgroup, hr, and script-supporting elements.
@danield770 danield770 requested a review from a team as a code owner October 25, 2023 16:30
@danield770 danield770 requested review from chrisdavidmills and removed request for a team October 25, 2023 16:30
@github-actions github-actions bot added the Content:HTML Hypertext Markup Language docs label Oct 25, 2023
Comment on lines +584 to +586
{{HTMLElement("optgroup")}} elements, {{HTMLElement("hr")}}, and <a href="https://html.spec.whatwg.org/#script-supporting-elements-2"
>script-supporting</a
> elements

This comment was marked as resolved.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This I think won't work because it's inside a <table>.

Copy link
Contributor

@skyclouds2001 skyclouds2001 Oct 25, 2023

Choose a reason for hiding this comment

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

This I think won't work because it's inside a <table>.

yes, my mistake

@estelle
Copy link
Member

estelle commented Oct 25, 2023

Most non-empty elements support script supporting elements (script and template), so we should either include it on all the elements that do (body, ol, li, hgroup, h1-h6, etc), or create a page for script supporting elements similar to global attributes (which are global to all element, not just "not empty" elements), and then refer to it as we refer to the page that explains script and template being able to be nested almost anywhere.

@chrisdavidmills chrisdavidmills removed their request for review October 31, 2023 09:03
@wbamberg
Copy link
Collaborator

wbamberg commented Nov 1, 2023

(I'm commenting here because I'm tagged for review, but @estelle if you want to take it from me I'm happy for you to do that too.)

Most non-empty elements support script supporting elements (script and template), so we should either include it on all the elements that do (body, ol, li, hgroup, h1-h6, etc), or create a page for script supporting elements similar to global attributes (which are global to all element, not just "not empty" elements), and then refer to it as we refer to the page that explains script and template being able to be nested almost anywhere.

From the spec it looks like the following are explicitly listed as including script supporting elements in their content model:

hgroup
ol
ul
menu
dl
div
picture
table
tbody
thead
tfoot
tr
select
datalist
optgroup

(this does not include elements that include them indirectly in "phrasing content").

Given that this isn't a massive list, I'd just vote to include it on these pages.

@@ -581,7 +581,9 @@ document.forms[0].onsubmit = (e) => {
<th scope="row">Permitted content</th>
<td>
Zero or more {{HTMLElement("option")}} or
{{HTMLElement("optgroup")}} elements.
{{HTMLElement("optgroup")}} elements, {{HTMLElement("hr")}}, and <a href="https://html.spec.whatwg.org/#script-supporting-elements-2"
Copy link
Member

Choose a reason for hiding this comment

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

hr-in-select is part of #26536. We would preferably have compatibility data, but I guess Firefox is the only browser that doesn't support this now, so it can just go through the typical Firefox release process.

Copy link
Contributor

Preview URLs

External URLs (1)

URL: /en-US/docs/Web/HTML/Element/select
Title: <select>: The HTML Select element

Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@estelle
Copy link
Member

estelle commented Dec 26, 2023

Thank you for your contribution. The hr in select was added, along with an example, inhttps://github.com//pull/31169/. It's live: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#technical_summary.

I'll close this PR. Thank you though.

@estelle estelle closed this Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs merge conflicts 🚧 [PR only]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants