diff --git a/routes/[...index].ts b/routes/[...index].ts index 7afa68d..6d824a0 100644 --- a/routes/[...index].ts +++ b/routes/[...index].ts @@ -97,7 +97,7 @@ async function buildRegistry(usedCustomElements: string[], type: "js" | "ts") { !isBaseClassImported && content.toString().includes("extends WebComponent") ) { - const baseClassImport = `import { WebComponent } from "https://unpkg.com/web-component-base@1.7.1/WebComponent.mjs";`; + const baseClassImport = `import { WebComponent } from "https://unpkg.com/web-component-base@1.9.1/WebComponent.mjs";`; registryScript += baseClassImport; isBaseClassImported = true; diff --git a/src/components/clickable-text.js b/src/components/clickable-text.js index 4ecda96..170f100 100644 --- a/src/components/clickable-text.js +++ b/src/components/clickable-text.js @@ -1,3 +1,7 @@ +/** + * Custom element using a minimal Web Component Base class + * @see https://ayco.io/n/web-component-base + */ class ClickableText extends WebComponent { onInit() { this.onclick = () => alert("Thank you for clicking the text!"); diff --git a/src/components/my-hello-world.js b/src/components/my-hello-world.js index d2efed6..6a0c1eb 100644 --- a/src/components/my-hello-world.js +++ b/src/components/my-hello-world.js @@ -1,3 +1,7 @@ +/** + * Custom element using a minimal Web Component Base class + * @see https://ayco.io/n/web-component-base + */ class HelloWorld extends WebComponent { static properties = ["data-name"]; @@ -10,6 +14,6 @@ class HelloWorld extends WebComponent { } get template() { - return ``; + return ``; } }