From f67632bb3cd2ea7bee7cc5e3ca342140455495ab Mon Sep 17 00:00:00 2001 From: Sascha Schulz <sschulz@dh-software.de> Date: Mi, 10 Apr 2024 12:00:13 +0200 Subject: [PATCH] Merge branch 'draft' --- assets/html/hello-sayer-2.js | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/assets/html/hello-sayer-2.js b/assets/html/hello-sayer-2.js new file mode 100644 index 0000000..9111138 --- /dev/null +++ b/assets/html/hello-sayer-2.js @@ -0,0 +1,19 @@ +class HelloSayerComponent extends HTMLElement { + constructor() { + super(); + + this.root = this.attachShadow({mode: "open"}); + + this.root.innerHTML = ` + <style> + span { + background-color: coral; + color: white; + } + </style> + <span>Hello <slot></slot>!</span> + `; + } +} + +window.customElements.define("hello-sayer", HelloSayerComponent); -- Gitblit v1.9.3