diff --git a/docs/p06-customElement.html b/docs/p06-customElement.html index af281da..9b15916 100644 --- a/docs/p06-customElement.html +++ b/docs/p06-customElement.html @@ -54,7 +54,7 @@ instance.addEventListener( document.body.append( instance, ); -
The customElementWithDDE
function is only (small) part of the inregration of the library. More important for coexistence is render component function as a body of the Custom Element.
import {
+
The customElementWithDDE
function is only (small) part of the inregration of the library. More important for coexistence is render component function as a body of the Custom Element. For that, you can use customElementRender
with arguments instance reference, target for connection, render function and optional properties (will be passed to the render function) see later…
import {
customElementRender,
customElementWithDDE,
} from "./esm-with-signals.js";
@@ -79,7 +79,7 @@ function ddeComponent({ attr }){
);
return el().append(
el("p", `Hello from Custom Element with attribute '${attr}'`)
- )
+ );
}
customElementWithDDE(HTMLCustomElement);
customElements.define(HTMLCustomElement.tagName, HTMLCustomElement);
@@ -87,4 +87,4 @@ customElements.define(HTMLCustomElement.tagName, HTMLCustomElement);
document.body.append(
el(HTMLCustomElement.tagName, { attr: "Attribute" })
);
-
customElementRender(<custom-element>, <connect-target>, <render-function>[, <properties>])
— use function to render DOM structure for given <custom-element>customElementWithDDE(<custom-element>)
— register <custom-element> to DDE library, see also `lifecyclesToEvents`, can be also used as decoratorobservedAttributes(<custom-element>)
— returns record of observed attributes (keys uses camelCase)S.observedAttributes(<custom-element>)
— returns record of observed attributes (keys uses camelCase and values are signals)lifecyclesToEvents(<class-declaration>)
— convert lifecycle methods to events, can be also used as decorator