Skip to content

Commit 1c2bd73

Browse files
authored
(fix) more missing attributes (#629)
#628 - add indeterminate attribute - ismap for img - allowpaymentrequest
1 parent dc97071 commit 1c2bd73

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

packages/language-server/src/plugins/html/dataProvider.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,18 @@ const videoAttributes: IAttributeData[] = [
245245
}
246246
];
247247

248+
const indeterminateAttribute: IAttributeData = {
249+
name: 'indeterminate',
250+
description: 'Available for type="checkbox"'
251+
};
252+
248253
const addAttributes: Record<string, IAttributeData[]> = {
249254
select: [{ name: 'bind:value' }],
250255
input: [
251256
{ name: 'bind:value' },
252-
{ name: 'bind:group', description: 'Available for type="radio" and type="checkbox"' }
257+
{ name: 'bind:group', description: 'Available for type="radio" and type="checkbox"' },
258+
indeterminateAttribute,
259+
{...indeterminateAttribute, name: 'bind:indeterminate'}
253260
],
254261
textarea: [{ name: 'bind:value' }],
255262
video: [...mediaAttributes, ...videoAttributes],

packages/svelte2tsx/svelte-jsx.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ declare namespace svelte.JSX {
229229
allow?: string;
230230
allowfullscreen?: boolean;
231231
allowtransparency?: boolean;
232+
allowpaymentrequest?: boolean;
232233
alt?: string;
233234
async?: boolean;
234235
autocomplete?: string;
@@ -296,6 +297,7 @@ declare namespace svelte.JSX {
296297
inputmode?: string;
297298
integrity?: string;
298299
is?: string;
300+
ismap?: boolean;
299301
keyparams?: string;
300302
keytype?: string;
301303
kind?: string;
@@ -685,6 +687,7 @@ declare namespace svelte.JSX {
685687
interface SvelteInputProps extends HTMLProps<HTMLInputElement> {
686688
group?: any;
687689
files?: FileList | null;
690+
indeterminate?: boolean;
688691
}
689692

690693
interface SvelteWindowProps {

0 commit comments

Comments
 (0)