IssueRaiser

Add `class` & `for` aliases for `className` and `htmlFor`

https://dom.spec.whatwg.org/#dom-element-classname https://html.spec.whatwg.org/multipage/forms.html#dom-label-htmlfor I assume these were originally given unusual and inconsistent names to avoid reserved words, but it isn't an issue with modern JavaScript. Could `class` be added to alias `className`, and `for` to alias `htmlFor`? The old names would be considered legacy. It's a minor thing, but it's polyfillable, and removes a weird inconsistency on the platform.

Posted by jakearchibald on Jun 4, 2023, 3:17 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments

github (Other)

Add `class` & `for` aliases for `className` and `htmlFor`

jakearchibaldJun 4, 2023, 3:17 PM

https://dom.spec.whatwg.org/#dom-element-classname https://html.spec.whatwg.org/multipage/forms.html#dom-label-htmlfor I assume these were originally given unusual and inconsistent names to avoid reserved words, but it isn't an issue with modern JavaScript. Could `class` be added to alias `className`, and `for` to alias `htmlFor`? The old names would be considered legacy. It's a minor thing, but it's polyfillable, and removes a weird inconsistency on the platform.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue