fix: remove indeterminate from boolean attributes (#8334)

It's only existing as a boolean property
cleanup of #7944
pull/8335/head
Simon H 1 year ago committed by GitHub
parent 3423bf6b30
commit 636290af95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,3 @@
// source: https://html.spec.whatwg.org/multipage/indices.html
const _boolean_attributes = [
'allowfullscreen',
'allowpaymentrequest',
@ -12,7 +11,6 @@ const _boolean_attributes = [
'disabled',
'formnovalidate',
'hidden',
'indeterminate',
'inert',
'ismap',
'itemscope',
@ -30,4 +28,9 @@ const _boolean_attributes = [
] as const;
export type BooleanAttributes = typeof _boolean_attributes[number];
/**
* List of HTML boolean attributes (e.g. `<input disabled>`).
* Source: https://html.spec.whatwg.org/multipage/indices.html
*/
export const boolean_attributes: Set<string> = new Set([..._boolean_attributes]);

@ -1,14 +1,14 @@
export default {
// This is a bit of a funny one — there's no equivalent attribute,
// so it can't be server-rendered
skip_if_ssr: true,
props: {
indeterminate: true
},
html: "<input type='checkbox'>",
// somehow ssr will render indeterminate=""
// the hydrated html will still contain that attribute
ssrHtml: "<input type='checkbox' indeterminate=''>",
test({ assert, component, target }) {
const input = target.querySelector('input');

Loading…
Cancel
Save