Skip to content

Add a data guideline for HTML constructors - #30349

Merged
ddbeck merged 3 commits into
mdn:mainfrom
Elchi3:html-ctor-guideline
Sep 1, 2026
Merged

ddbeck merged 3 commits into
mdn:mainfrom
Elchi3:html-ctor-guideline

Conversation

@Elchi3

@Elchi3 Elchi3 commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

This PR proposes a guideline to formalize what has been happening all along: HTML elements get no key for their constructors. In the past, probably accidentally, two HTML element constructors have been added for HTMLGeolocation and HTMLOutputElement. This PR removes that data.

Alternative

The alternative is that all HTML element APIs get their constructor key. I believe they only got their constructors when custom elements were introduced, but I might be wrong. Developers don't use HTML element constructors directly. I think they are only meaningful in the context of custom elements. (Docs written at https://developer.mozilla.org/en-US/docs/Web/API/HTMLGeolocationElement/HTMLGeolocationElement are really weak and don't really illustrate any useful usage imho).

Related issues

Unblocks

@Elchi3 Elchi3 added the meeting agenda Issue or pull request requiring discussion in a project meeting. label Aug 27, 2026
@github-actions github-actions Bot added data:api Compatibility data for Web API features. https://developer.mozilla.org/docs/Web/API docs Issue or pull request concerning project documentation. size:m Pull request changing 25-100 lines of code. labels Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@ddbeck ddbeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm still mulling over whether this is the right choice, but this is the status quo so we ought to document it (and/or change it if we want a policy change). Some writing suggestions in line comments. Thank you!

Comment thread docs/data-guidelines/api.md Outdated
Comment thread docs/data-guidelines/api.md
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
@Elchi3

Elchi3 commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

I filed issue for future work:

@Elchi3
Elchi3 requested a review from ddbeck September 1, 2026 10:01

@ddbeck ddbeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

@ddbeck
ddbeck merged commit f4399b7 into mdn:main Sep 1, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in BCD meeting agenda Sep 1, 2026
@Elchi3
Elchi3 deleted the html-ctor-guideline branch September 1, 2026 10:04
@mdn-bot mdn-bot mentioned this pull request Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compatibility data for Web API features. https://developer.mozilla.org/docs/Web/API docs Issue or pull request concerning project documentation. meeting agenda Issue or pull request requiring discussion in a project meeting. size:m Pull request changing 25-100 lines of code.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants