diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 0000000..f7430e5 --- /dev/null +++ b/examples/index.html @@ -0,0 +1,16 @@ + + + + + + + Example + + + + + + + + + \ No newline at end of file diff --git a/index.ts b/index.ts index 11f19ff..8f24a61 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,17 @@ -function sum(a: number, b: number) +class Geometry extends HTMLElement { - return a + b; + constructor() + { + super(); + + this.attachShadow({mode: "open"}); + + console.log("Created Geomtry tag"); + const text = document.createElement("p") + text.innerText = "Geometry tag"; + + this.shadowRoot.append(text); + } } -console.log(sum(420, 69)); \ No newline at end of file +customElements.define("custom-geometry", Geometry); \ No newline at end of file