mirror of https://github.com/sveltejs/svelte
parent
ed6d751e28
commit
760d336a32
@ -1,35 +1,37 @@
|
|||||||
const _boolean_attributes = [
|
const _boolean_attributes = [
|
||||||
'allowfullscreen',
|
'allowfullscreen',
|
||||||
'allowpaymentrequest',
|
'allowpaymentrequest',
|
||||||
'async',
|
'async',
|
||||||
'autofocus',
|
'autofocus',
|
||||||
'autoplay',
|
'autoplay',
|
||||||
'checked',
|
'checked',
|
||||||
'controls',
|
'controls',
|
||||||
'default',
|
'default',
|
||||||
'defer',
|
'defer',
|
||||||
'disabled',
|
'disabled',
|
||||||
'formnovalidate',
|
'formnovalidate',
|
||||||
'hidden',
|
'hidden',
|
||||||
'inert',
|
'inert',
|
||||||
'ismap',
|
'ismap',
|
||||||
'loop',
|
'loop',
|
||||||
'multiple',
|
'multiple',
|
||||||
'muted',
|
'muted',
|
||||||
'nomodule',
|
'nomodule',
|
||||||
'novalidate',
|
'novalidate',
|
||||||
'open',
|
'open',
|
||||||
'playsinline',
|
'playsinline',
|
||||||
'readonly',
|
'readonly',
|
||||||
'required',
|
'required',
|
||||||
'reversed',
|
'reversed',
|
||||||
'selected'
|
'selected'
|
||||||
] as const;
|
];
|
||||||
|
|
||||||
export type BooleanAttributes = (typeof _boolean_attributes)[number];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of HTML boolean attributes (e.g. `<input disabled>`).
|
* List of HTML boolean attributes (e.g. `<input disabled>`).
|
||||||
* Source: https://html.spec.whatwg.org/multipage/indices.html
|
* Source: https://html.spec.whatwg.org/multipage/indices.html
|
||||||
|
* @type {Set<string>}
|
||||||
*/
|
*/
|
||||||
export const boolean_attributes: Set<string> = new Set([..._boolean_attributes]);
|
export const boolean_attributes = new Set([..._boolean_attributes]);
|
||||||
|
|
||||||
|
|
||||||
|
/** @typedef {Class<_boolean_attributes>} BooleanAttributes */
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in new issue