From d2933fffc73e5e2af0a671b6f63559e7c0b74d42 Mon Sep 17 00:00:00 2001 From: Bashamega Date: Sun, 6 Sep 2026 18:24:27 +0300 Subject: [PATCH 1/2] Update crossOrigin property type in HTMLImageElement interface to restrict values to "use-credentials" or "anonymous" across multiple TypeScript baseline files. --- baselines/dom.generated.d.ts | 2 +- baselines/ts5.5/dom.generated.d.ts | 2 +- baselines/ts5.6/dom.generated.d.ts | 2 +- baselines/ts5.9/dom.generated.d.ts | 2 +- inputfiles/patches/html.kdl | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 74c47ae0d..6a0a5be8d 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -19055,7 +19055,7 @@ interface HTMLImageElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/crossOrigin) */ - crossOrigin: string | null; + crossOrigin: "use-credentials" | "anonymous" | null; /** * The **`currentSrc`** read-only property of the HTMLImageElement interface indicates the URL of the image selected by the browser to load. * diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 61e3f2db2..5c5bb84eb 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -19037,7 +19037,7 @@ interface HTMLImageElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/crossOrigin) */ - crossOrigin: string | null; + crossOrigin: "use-credentials" | "anonymous" | null; /** * The **`currentSrc`** read-only property of the HTMLImageElement interface indicates the URL of the image selected by the browser to load. * diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index ec099f4f8..9cd6f0a54 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -19052,7 +19052,7 @@ interface HTMLImageElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/crossOrigin) */ - crossOrigin: string | null; + crossOrigin: "use-credentials" | "anonymous" | null; /** * The **`currentSrc`** read-only property of the HTMLImageElement interface indicates the URL of the image selected by the browser to load. * diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index c7be83a7a..63400475a 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -19052,7 +19052,7 @@ interface HTMLImageElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/crossOrigin) */ - crossOrigin: string | null; + crossOrigin: "use-credentials" | "anonymous" | null; /** * The **`currentSrc`** read-only property of the HTMLImageElement interface indicates the URL of the image selected by the browser to load. * diff --git a/inputfiles/patches/html.kdl b/inputfiles/patches/html.kdl index bd56b40ca..365172eca 100644 --- a/inputfiles/patches/html.kdl +++ b/inputfiles/patches/html.kdl @@ -77,6 +77,7 @@ interface-mixin WindowEventHandlers { interface HTMLImageElement { property decoding overrideType=#""async" | "sync" | "auto""# property loading overrideType=#""eager" | "lazy""# + property crossOrigin overrideType=#""use-credentials" | "anonymous""# } interface HTMLInputElement { From 51e6772ce24562ccad8f54f74ec5cab23de25945 Mon Sep 17 00:00:00 2001 From: Bashamega Date: Mon, 7 Sep 2026 12:55:05 +0300 Subject: [PATCH 2/2] Refactor crossOrigin property type in HTMLImageElement interface to ensure consistent ordering of values across TypeScript baseline files. --- baselines/dom.generated.d.ts | 2 +- baselines/ts5.5/dom.generated.d.ts | 2 +- baselines/ts5.6/dom.generated.d.ts | 2 +- baselines/ts5.9/dom.generated.d.ts | 2 +- inputfiles/patches/html.kdl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 6a0a5be8d..b46b911b2 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -19055,7 +19055,7 @@ interface HTMLImageElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/crossOrigin) */ - crossOrigin: "use-credentials" | "anonymous" | null; + crossOrigin: "anonymous" | "use-credentials" | null; /** * The **`currentSrc`** read-only property of the HTMLImageElement interface indicates the URL of the image selected by the browser to load. * diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 5c5bb84eb..a5f6e33f4 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -19037,7 +19037,7 @@ interface HTMLImageElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/crossOrigin) */ - crossOrigin: "use-credentials" | "anonymous" | null; + crossOrigin: "anonymous" | "use-credentials" | null; /** * The **`currentSrc`** read-only property of the HTMLImageElement interface indicates the URL of the image selected by the browser to load. * diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 9cd6f0a54..6ba659923 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -19052,7 +19052,7 @@ interface HTMLImageElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/crossOrigin) */ - crossOrigin: "use-credentials" | "anonymous" | null; + crossOrigin: "anonymous" | "use-credentials" | null; /** * The **`currentSrc`** read-only property of the HTMLImageElement interface indicates the URL of the image selected by the browser to load. * diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 63400475a..5b03b583e 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -19052,7 +19052,7 @@ interface HTMLImageElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/crossOrigin) */ - crossOrigin: "use-credentials" | "anonymous" | null; + crossOrigin: "anonymous" | "use-credentials" | null; /** * The **`currentSrc`** read-only property of the HTMLImageElement interface indicates the URL of the image selected by the browser to load. * diff --git a/inputfiles/patches/html.kdl b/inputfiles/patches/html.kdl index 365172eca..99670f184 100644 --- a/inputfiles/patches/html.kdl +++ b/inputfiles/patches/html.kdl @@ -77,7 +77,7 @@ interface-mixin WindowEventHandlers { interface HTMLImageElement { property decoding overrideType=#""async" | "sync" | "auto""# property loading overrideType=#""eager" | "lazy""# - property crossOrigin overrideType=#""use-credentials" | "anonymous""# + property crossOrigin overrideType=#""anonymous" | "use-credentials""# } interface HTMLInputElement {