mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-22 07:49:38 +01:00
🔤 ce wip
This commit is contained in:
parent
a5efbd236c
commit
55860b99eb
File diff suppressed because one or more lines are too long
@ -23,7 +23,7 @@ function ddeComponent({ attr }){
|
|||||||
);
|
);
|
||||||
return el().append(
|
return el().append(
|
||||||
el("p", `Hello from Custom Element with attribute '${attr}'`)
|
el("p", `Hello from Custom Element with attribute '${attr}'`)
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
customElementWithDDE(HTMLCustomElement);
|
customElementWithDDE(HTMLCustomElement);
|
||||||
customElements.define(HTMLCustomElement.tagName, HTMLCustomElement);
|
customElements.define(HTMLCustomElement.tagName, HTMLCustomElement);
|
||||||
|
@ -76,7 +76,10 @@ export function page({ pkg, info }){
|
|||||||
`),
|
`),
|
||||||
el(example, { src: fileURL("./components/examples/customElement/dde.js"), page_id }),
|
el(example, { src: fileURL("./components/examples/customElement/dde.js"), page_id }),
|
||||||
el("p").append(...T`
|
el("p").append(...T`
|
||||||
…
|
…as you can see, you can use components created based on the documentation previously introduced. To unlock
|
||||||
|
full potential, use with combination ${el("code", "customElementWithDDE")} (allows to use livecycle events)
|
||||||
|
and ${el("code", "observedAttributes")} (converts attributes to render function arguments —
|
||||||
|
${el("em", "default")}) or ${el("code", "S.observedAttributes")} (converts attributes to signals).
|
||||||
`),
|
`),
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user