From 2fdb23c799df383d73dcca453f79882db1fa8122 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Tue, 11 Feb 2025 13:07:18 -0800 Subject: [PATCH 1/3] support per-component polyfill fallbacks --- document/js-api/index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 01dfc58e..56d5d581 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -459,7 +459,7 @@ To instantiate imported strings with module |module| and |importedStr 1. [=map/set|Set=] |builtinOrStringImports|[|importedStringModule|] to |exportsObject| 1. Let |imports| be « ». 1. [=list/iterate|For each=] (|moduleName|, |componentName|, |externtype|) of [=module_imports=](|module|), - 1. If |builtinOrStringImports| [=map/exist|contains=] |moduleName|, + 1. If |builtinOrStringImports| [=map/exist|contains=] |moduleName| and |builtinOrStringImports|[|moduleName|] [=map/exist|contains=] |componentName|, 1. Let |o| be |builtinOrStringImports|[|moduleName|] 1. Else, 1. Let |o| be [=?=] [$Get$](|importObject|, |moduleName|). From 3dfad26066dcd206c4714f29b8765e46aeff09b4 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Tue, 11 Feb 2025 13:17:51 -0800 Subject: [PATCH 2/3] spec rework --- document/js-api/index.bs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 56d5d581..f96f2258 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -459,8 +459,10 @@ To instantiate imported strings with module |module| and |importedStr 1. [=map/set|Set=] |builtinOrStringImports|[|importedStringModule|] to |exportsObject| 1. Let |imports| be « ». 1. [=list/iterate|For each=] (|moduleName|, |componentName|, |externtype|) of [=module_imports=](|module|), - 1. If |builtinOrStringImports| [=map/exist|contains=] |moduleName| and |builtinOrStringImports|[|moduleName|] [=map/exist|contains=] |componentName|, - 1. Let |o| be |builtinOrStringImports|[|moduleName|] + 1. If |builtinOrStringImports| [=map/exist|contains=] |moduleName|, + 1. Let |o| be |builtinOrStringImports|[|moduleName|]. + 1. If |o| [=is not an Object=] of if |o| [=map/exist|does not contain=] |componentName|, + 1. Set |o| to [=?=] [$Get$](|importObject|, |moduleName|). 1. Else, 1. Let |o| be [=?=] [$Get$](|importObject|, |moduleName|). 1. If |o| [=is not an Object=], throw a {{TypeError}} exception. From 9b503bf7cff38eb6bdec2be4a94f50ad8db59858 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Tue, 11 Feb 2025 13:24:15 -0800 Subject: [PATCH 3/3] typo --- document/js-api/index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index f96f2258..8c8310de 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -461,7 +461,7 @@ To instantiate imported strings with module |module| and |importedStr 1. [=list/iterate|For each=] (|moduleName|, |componentName|, |externtype|) of [=module_imports=](|module|), 1. If |builtinOrStringImports| [=map/exist|contains=] |moduleName|, 1. Let |o| be |builtinOrStringImports|[|moduleName|]. - 1. If |o| [=is not an Object=] of if |o| [=map/exist|does not contain=] |componentName|, + 1. If |o| [=is not an Object=] or if |o| [=map/exist|does not contain=] |componentName|, 1. Set |o| to [=?=] [$Get$](|importObject|, |moduleName|). 1. Else, 1. Let |o| be [=?=] [$Get$](|importObject|, |moduleName|).