summaryrefslogtreecommitdiff
path: root/packages/webapi/src/lib/CustomElementRegistry.ts
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-04-13 08:44:22 -0400
committerGravatar GitHub <noreply@github.com> 2022-04-13 08:44:22 -0400
commit5acf77dd22be95e33ff838383a2c1790f484e380 (patch)
tree3ca2f5e2f49a05f0c3f1e834fb3ed40a7bc2f2a2 /packages/webapi/src/lib/CustomElementRegistry.ts
parent200a01c4f8a6d5685bfd063c294b6a6593bbad77 (diff)
downloadastro-5acf77dd22be95e33ff838383a2c1790f484e380.tar.gz
astro-5acf77dd22be95e33ff838383a2c1790f484e380.tar.zst
astro-5acf77dd22be95e33ff838383a2c1790f484e380.zip
Re-enable custom element test and fix "undefined" child (#3095)
* Re-enable custom element test and fix "undefined" child * Remove outdated comment * Adds a changeset
Diffstat (limited to 'packages/webapi/src/lib/CustomElementRegistry.ts')
-rw-r--r--packages/webapi/src/lib/CustomElementRegistry.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/webapi/src/lib/CustomElementRegistry.ts b/packages/webapi/src/lib/CustomElementRegistry.ts
index 3f7020087..3429e1e73 100644
--- a/packages/webapi/src/lib/CustomElementRegistry.ts
+++ b/packages/webapi/src/lib/CustomElementRegistry.ts
@@ -26,6 +26,11 @@ export class CustomElementRegistry {
if (!/-/.test(name))
throw new SyntaxError('Custom element name must contain a hyphen')
+ _.INTERNALS.set(constructor, {
+ attributes: {},
+ localName: name,
+ } as any)
+
internals.constructorByName.set(name, constructor)
internals.nameByConstructor.set(constructor, name)