mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-07-03 13:12:14 +02:00
🔤 Improves and updates docs
- customElementRender - introduction example
This commit is contained in:
@ -7,7 +7,6 @@ export class HTMLCustomElement extends HTMLElement{
|
||||
static observedAttributes= [ "attr" ];
|
||||
connectedCallback(){
|
||||
customElementRender(
|
||||
this,
|
||||
this.attachShadow({ mode: "open" }),
|
||||
ddeComponent
|
||||
);
|
||||
|
@ -11,7 +11,6 @@ export class HTMLCustomElement extends HTMLElement{
|
||||
connectedCallback(){
|
||||
console.log(observedAttributes(this));
|
||||
customElementRender(
|
||||
this,
|
||||
this.attachShadow({ mode: "open" }),
|
||||
ddeComponent,
|
||||
S.observedAttributes
|
||||
|
@ -17,11 +17,7 @@ function ddeComponent(){
|
||||
export class A extends HTMLElement{
|
||||
static tagName= "custom-element-without";
|
||||
connectedCallback(){
|
||||
customElementRender(
|
||||
this,
|
||||
this,
|
||||
ddeComponent
|
||||
);
|
||||
customElementRender(this, ddeComponent);
|
||||
}
|
||||
}
|
||||
customElementWithDDE(A);
|
||||
@ -30,7 +26,6 @@ export class B extends HTMLElement{
|
||||
static tagName= "custom-element-open";
|
||||
connectedCallback(){
|
||||
customElementRender(
|
||||
this,
|
||||
this.attachShadow({ mode: "open" }),
|
||||
ddeComponent
|
||||
);
|
||||
@ -42,7 +37,6 @@ export class C extends HTMLElement{
|
||||
static tagName= "custom-element-closed";
|
||||
connectedCallback(){
|
||||
customElementRender(
|
||||
this,
|
||||
this.attachShadow({ mode: "closed" }),
|
||||
ddeComponent
|
||||
);
|
||||
|
@ -8,7 +8,7 @@ export class HTMLCustomElement extends HTMLElement{
|
||||
static tagName= "custom-slotting";
|
||||
connectedCallback(){
|
||||
const c= ()=> simulateSlots(this, ddeComponent());
|
||||
customElementRender(this, this, c);
|
||||
customElementRender(this, c);
|
||||
}
|
||||
}
|
||||
customElementWithDDE(HTMLCustomElement);
|
||||
|
Reference in New Issue
Block a user