Skip to content

feat(types): add new HTML attributes for improved JSX support #13370

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
26 changes: 18 additions & 8 deletions packages/runtime-dom/src/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
contextmenu?: string
dir?: string
draggable?: Booleanish
enterkeyhint?:
| 'enter'
| 'done'
| 'go'
| 'next'
| 'previous'
| 'search'
| 'send'
hidden?: Booleanish | '' | 'hidden' | 'until-found'
id?: string
inert?: Booleanish
Expand Down Expand Up @@ -323,6 +331,14 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
*/
is?: string
/**
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts
*/
exportparts?: string
/**
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part
*/
part?: string
}

type HTMLAttributeReferrerPolicy =
Expand Down Expand Up @@ -475,6 +491,7 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
alt?: string
crossorigin?: 'anonymous' | 'use-credentials' | ''
decoding?: 'async' | 'auto' | 'sync'
fetchpriority?: 'high' | 'low' | 'auto'
height?: Numberish
loading?: 'eager' | 'lazy'
referrerpolicy?: HTMLAttributeReferrerPolicy
Expand Down Expand Up @@ -524,14 +541,6 @@ export interface InputHTMLAttributes extends HTMLAttributes {
checked?: Booleanish | any[] | Set<any> // for IDE v-model multi-checkbox support
crossorigin?: string
disabled?: Booleanish
enterKeyHint?:
| 'enter'
| 'done'
| 'go'
| 'next'
| 'previous'
| 'search'
| 'send'
form?: string
formaction?: string
formenctype?: string
Expand Down Expand Up @@ -1257,6 +1266,7 @@ export interface IntrinsicElementAttributes {
polyline: SVGAttributes
radialGradient: SVGAttributes
rect: SVGAttributes
set: SVGAttributes
stop: SVGAttributes
switch: SVGAttributes
symbol: SVGAttributes
Expand Down