1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-01 12:22:15 +02:00
This commit is contained in:
2024-01-31 14:37:57 +01:00
parent 13c75fede1
commit b326c0e050
10 changed files with 195 additions and 158 deletions

View File

@ -12,9 +12,7 @@ export class CustomHTMLTestElement extends HTMLElement{
}
connectedCallback(){
if(!this.hasAttribute("pre-name")) this.setAttribute("pre-name", "default");
this.attachShadow({ mode: "open" }).append(
customElementRender(this, this.render, this.attributes)
);
customElementRender(this, this.attachShadow({ mode: "open" }), this.render, this.attributes)
}
attributes(element){
@ -23,6 +21,7 @@ export class CustomHTMLTestElement extends HTMLElement{
}
render({ name, preName, test }){
console.log(scope.state);
console.log({ name, preName, test });
scope.host(
on.connected(()=> console.log(CustomHTMLTestElement)),
on.attributeChanged(e=> console.log(e)),
@ -63,7 +62,7 @@ export class CustomSlottingHTMLElement extends HTMLElement{
));
}
connectedCallback(){
this.append(customElementRender(this, this.render));
customElementRender(this, this, this.render);
}
}
customElementWithDDE(CustomSlottingHTMLElement);