Elements
<ceb/>
relies on the Builder Pattern and also Decorators to define, enhance and finally register Custom Elements.
The main builder ElementBuilder handles the definition and registration of Custom Elements.
Then, other builders can be used to enhance it:
- AttributeBuilder: to define attributes and react on changes
- FieldBuilder: to define fields (property/attribute) and react on changes
- OnBuilder: to listen to DOM events
- ContentBuilder: to initialize the light or shadow DOM
- TemplateBuilder: to path the DOM of the custom element
- ReferenceBuilder: to get reference of children nodes
- AttributePropagationBuilder: to delegate attribute mutations to child nodes
- PropertyDelegationBuilder: to delegate the property accesses to a single child node
For convenience, the package @tmorin/ceb-bundle-web provides all built-in artifacts for the Custom Elements authoring.