From 8613ac134d4d7094dd391b0452cf7563ff59b309 Mon Sep 17 00:00:00 2001 From: oscar marina Date: Wed, 5 Mar 2025 15:18:15 +0100 Subject: [PATCH] [scoped-custom-element-registry] Non-string values not stringified in setAttribute --- .../src/scoped-custom-element-registry.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts b/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts index d46f9228..5cc04187 100644 --- a/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts +++ b/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts @@ -520,7 +520,8 @@ const patchAttributes = ( if (observedAttributes.has(name)) { const old = this.getAttribute(name); setAttribute.call(this, name, value); - attributeChangedCallback.call(this, name, old, value); + const newValue = this.getAttribute(name); + attributeChangedCallback.call(this, name, old, newValue); } else { setAttribute.call(this, name, value); }