1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-01 20:32:13 +02:00

🐛 adds missing

This commit is contained in:
2024-11-22 17:52:13 +01:00
parent 576b33921b
commit 35466c201d
3 changed files with 51 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import {
customElementRender,
customElementWithDDE,
observedAttributes,
el, on, scope
el, on, scope,
} from "deka-dom-el";
import { S } from "deka-dom-el/signals";
export class HTMLCustomElement extends HTMLElement{
@ -24,7 +24,7 @@ export class HTMLCustomElement extends HTMLElement{
/** @param {{ attr: ddeSignal<string, {}> }} props */
function ddeComponent({ attr }){
scope.host(
on.connected(e=> console.log(e.target.outerHTML)),
on.connected(e=> console.log(( /** @type {HTMLParagraphElement} */ (e.target)).outerHTML)),
);
return el().append(
el("p", S(()=> `Hello from Custom Element with attribute '${attr()}'`))