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

Remove HTMLOutputElement() HTML constructor #24369

Closed
wants to merge 2 commits into from

Conversation

skyclouds2001
Copy link
Contributor

@skyclouds2001 skyclouds2001 commented Sep 7, 2024

Summary

like any other HTML constructor, calling new HTMLOutputElement() will throw an error:

image

normally HTML constructor does not store its data, see also #21923, #17651

note that this is accidentally added via #13453

Test results and supporting details

Related issues

fixes #22146

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Sep 7, 2024
@skyclouds2001 skyclouds2001 marked this pull request as ready for review September 7, 2024 18:04
Copy link

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

@github-actions github-actions bot added the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Sep 10, 2024
@github-actions github-actions bot removed the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Sep 10, 2024
@Josh-Cena
Copy link
Member

The data clearly tells you that HTMLOutputElement is only a valid constructor in Safari. It still works in latest Safari.

image

@skyclouds2001
Copy link
Contributor Author

skyclouds2001 commented Sep 15, 2024

understand, so trying to construct HTMLOutputElement will not fail in Safari, while other browsers will fail and also fit the standard

see also https://html.spec.whatwg.org/multipage/form-elements.html#htmloutputelement and https://html.spec.whatwg.org/multipage/dom.html#htmlconstructor

I wonder if HTMLOutputElement is the only HTML element has this behavior. If so, we could still keep this data; if not, we should not keep it, as this is a non-standard behavior and probably a browser bug, and follows the way of other HTML element

@queengooborg
Copy link
Collaborator

Closed this because this constructor is definitely still supported in Safari, so it should not be removed from BCD. It's already marked as non-standard behavior.

@skyclouds2001 skyclouds2001 deleted the HTMLOutputElement branch September 24, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

api.HTMLOutputElement.HTMLOutputElement - Unexpected BCD of HTML Constructor
3 participants