From 9a179b66931b0eb8a2bd964e377938cfccbbbe19 Mon Sep 17 00:00:00 2001 From: Bashamega Date: Wed, 24 Dec 2025 07:43:38 +0200 Subject: [PATCH 1/8] Migrate IntersectionObserverEntry --- inputfiles/patches/intersection-observer.kdl | 5 +++++ inputfiles/removedTypes.jsonc | 3 --- src/build/patches.ts | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 inputfiles/patches/intersection-observer.kdl diff --git a/inputfiles/patches/intersection-observer.kdl b/inputfiles/patches/intersection-observer.kdl new file mode 100644 index 000000000..81ecd6084 --- /dev/null +++ b/inputfiles/patches/intersection-observer.kdl @@ -0,0 +1,5 @@ +removals { + interface IntersectionObserverEntry { + constructor // WebKit-only as of 2025-12 + } +} \ No newline at end of file diff --git a/inputfiles/removedTypes.jsonc b/inputfiles/removedTypes.jsonc index f3b430048..6202cdd26 100644 --- a/inputfiles/removedTypes.jsonc +++ b/inputfiles/removedTypes.jsonc @@ -36,9 +36,6 @@ } } }, - "IntersectionObserverEntry": { - "constructor": null // WebKit-only as of 2024-07 - }, "OffscreenCanvasRenderingContext2D": { "implements": ["CanvasSettings"] // Blink only as of 2025-01 }, diff --git a/src/build/patches.ts b/src/build/patches.ts index 75bb59c83..b1f2c87b0 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -217,8 +217,8 @@ function handleMixinAndInterfaces( return { name, ...optionalNestedMember("events", event, { event }), - properties: { property }, - methods: { method }, + ...optionalNestedMember("properties", property, { property }), + ...optionalNestedMember("methods", method, { method }), ...optionalMember("extends", "string", node.properties?.extends), ...optionalMember("overrideThis", "string", node.properties?.overrideThis), ...optionalMember("forward", "string", node.properties?.forward), @@ -449,7 +449,7 @@ function convertForRemovals(obj: unknown): unknown { if (obj && typeof obj === "object") { const newObj: Record = {}; for (const [key, value] of Object.entries(obj)) { - if (key !== "name") { + if (!["name", "signature"].includes(key)) { const cleaned = convertForRemovals(value); // (intentionally covers null too) if (typeof cleaned === "object") { From 61c09a1346fab00f756a861de3affd20c2a1deac Mon Sep 17 00:00:00 2001 From: Bashamega Date: Wed, 24 Dec 2025 07:44:10 +0200 Subject: [PATCH 2/8] new line --- inputfiles/patches/intersection-observer.kdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputfiles/patches/intersection-observer.kdl b/inputfiles/patches/intersection-observer.kdl index 81ecd6084..e630c7874 100644 --- a/inputfiles/patches/intersection-observer.kdl +++ b/inputfiles/patches/intersection-observer.kdl @@ -2,4 +2,4 @@ removals { interface IntersectionObserverEntry { constructor // WebKit-only as of 2025-12 } -} \ No newline at end of file +} From fe51565ebbfe816a15e85930d884e7c7c613fcc4 Mon Sep 17 00:00:00 2001 From: Bashamega Date: Wed, 24 Dec 2025 17:55:20 +0200 Subject: [PATCH 3/8] Fix --- src/build/patches.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/build/patches.ts b/src/build/patches.ts index 8108c6d60..0525acdac 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -348,7 +348,7 @@ function handleMethodAndConstructor( const signatureIndex = child.properties?.signatureIndex; const type = handleTyped(typeNodes, child.properties?.returns); - let signature: OverridableMethod["signature"] = []; + let signature: OverridableMethod["signature"] | undefined = undefined; if (type || params.length > 0) { // Determine the actual signature object const signatureObj: DeepPartial = { @@ -360,6 +360,10 @@ function handleMethodAndConstructor( } else { signature = [signatureObj]; } + if (signatureObj.param?.length === 0 && !signatureObj.type) { + // If there are no params and no return type, remove the signature + signature = undefined; + } } return { name, @@ -454,7 +458,7 @@ function convertForRemovals(obj: unknown): unknown { if (obj && typeof obj === "object") { const newObj: Record = {}; for (const [key, value] of Object.entries(obj)) { - if (!["name", "signature"].includes(key)) { + if (key !== "name") { const cleaned = convertForRemovals(value); // (intentionally covers null too) if (typeof cleaned === "object") { From c91c7a44459691106508b288d3c62a4bdcd735d4 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Fri, 26 Dec 2025 20:05:35 +0100 Subject: [PATCH 4/8] Update inputfiles/patches/intersection-observer.kdl --- inputfiles/patches/intersection-observer.kdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputfiles/patches/intersection-observer.kdl b/inputfiles/patches/intersection-observer.kdl index a1da772c4..1055e819b 100644 --- a/inputfiles/patches/intersection-observer.kdl +++ b/inputfiles/patches/intersection-observer.kdl @@ -1,6 +1,6 @@ removals { interface IntersectionObserverEntry { - constructor // WebKit-only as of 2025-12 + constructor // WebKit-only as of 2025-12 } dictionary IntersectionObserverInit { member delay // Blink only as of 2025-12 From 4c7befe6fe48155241bfb483fa8e5439ea5baea5 Mon Sep 17 00:00:00 2001 From: Bashamega Date: Sat, 27 Dec 2025 14:32:44 +0200 Subject: [PATCH 5/8] - --- src/build/patches.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/patches.ts b/src/build/patches.ts index 6239609d0..f03cf282e 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -369,7 +369,7 @@ function handleMethodAndConstructor( } else { signature = [signatureObj]; } - if (signatureObj.param?.length === 0 && !signatureObj.type) { + if (isConstructor && signatureObj.param?.length === 0) { // If there are no params and no return type, remove the signature signature = undefined; } From ae01428d4f5ef05da972838b528ecd3e2d5eca7b Mon Sep 17 00:00:00 2001 From: Bashamega Date: Sat, 27 Dec 2025 14:48:51 +0200 Subject: [PATCH 6/8] - --- src/build/patches.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/build/patches.ts b/src/build/patches.ts index f03cf282e..3fc7998b7 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -366,13 +366,9 @@ function handleMethodAndConstructor( }; if (typeof signatureIndex == "number") { signature = { [signatureIndex]: signatureObj }; - } else { + } else if (!isConstructor) { signature = [signatureObj]; } - if (isConstructor && signatureObj.param?.length === 0) { - // If there are no params and no return type, remove the signature - signature = undefined; - } } return { name, From 6a7373b49c270b419f38939c103cf90b9d1fd2f1 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sat, 27 Dec 2025 15:30:07 +0100 Subject: [PATCH 7/8] Update constructor syntax for IntersectionObserverEntry --- inputfiles/patches/intersection-observer.kdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputfiles/patches/intersection-observer.kdl b/inputfiles/patches/intersection-observer.kdl index 1055e819b..5b31bb855 100644 --- a/inputfiles/patches/intersection-observer.kdl +++ b/inputfiles/patches/intersection-observer.kdl @@ -1,6 +1,6 @@ removals { interface IntersectionObserverEntry { - constructor // WebKit-only as of 2025-12 + constructor signatureIndex=0 // WebKit-only as of 2025-12 } dictionary IntersectionObserverInit { member delay // Blink only as of 2025-12 From db959a00ee3c48e3d94df01023cdd843520dc83a Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sat, 27 Dec 2025 15:34:33 +0100 Subject: [PATCH 8/8] remove ctor check --- src/build/patches.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/patches.ts b/src/build/patches.ts index 3fc7998b7..04e8e2aca 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -366,7 +366,7 @@ function handleMethodAndConstructor( }; if (typeof signatureIndex == "number") { signature = { [signatureIndex]: signatureObj }; - } else if (!isConstructor) { + } else { signature = [signatureObj]; } }