From 3a06ac7396394c7cd4de3d08706f92246f2f7675 Mon Sep 17 00:00:00 2001 From: ascorbic Date: Sun, 4 Feb 2024 08:49:37 +0000 Subject: [PATCH 1/2] feat: add fetchpriority to img attrs --- packages/svelte/elements.d.ts | 1 + packages/svelte/src/constants.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts index e7d4fe807847..f453cee08e53 100644 --- a/packages/svelte/elements.d.ts +++ b/packages/svelte/elements.d.ts @@ -978,6 +978,7 @@ export interface HTMLImgAttributes extends HTMLAttributes { alt?: string | undefined | null; crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined | null; decoding?: 'async' | 'auto' | 'sync' | undefined | null; + fetchpriority?: 'auto' | 'high' | 'low' | undefined | null; height?: number | string | undefined | null; ismap?: boolean | undefined | null; loading?: 'eager' | 'lazy' | undefined | null; diff --git a/packages/svelte/src/constants.js b/packages/svelte/src/constants.js index 45b4d25835ef..0b2f6eac7edb 100644 --- a/packages/svelte/src/constants.js +++ b/packages/svelte/src/constants.js @@ -49,6 +49,7 @@ export const PassiveDelegatedEvents = ['touchstart', 'touchmove', 'touchend']; */ export const AttributeAliases = { // no `class: 'className'` because we handle that separately + fetchpriority: 'fetchPriority', formnovalidate: 'formNoValidate', ismap: 'isMap', nomodule: 'noModule', From aaa3420f57f1b4625253941d02735f2271e95654 Mon Sep 17 00:00:00 2001 From: ascorbic Date: Sun, 4 Feb 2024 15:25:34 +0000 Subject: [PATCH 2/2] chore: remove attr alias --- packages/svelte/src/constants.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/svelte/src/constants.js b/packages/svelte/src/constants.js index 0b2f6eac7edb..45b4d25835ef 100644 --- a/packages/svelte/src/constants.js +++ b/packages/svelte/src/constants.js @@ -49,7 +49,6 @@ export const PassiveDelegatedEvents = ['touchstart', 'touchmove', 'touchend']; */ export const AttributeAliases = { // no `class: 'className'` because we handle that separately - fetchpriority: 'fetchPriority', formnovalidate: 'formNoValidate', ismap: 'isMap', nomodule: 'noModule',