the type of the Custom Element
Delegate the access to an attribute.
the attribute name.
When targeting an attribute, switch the boolean mode.
When the value is truthy, the attribute's value is "". When the value is falsy, the attribute is removed.
This API is dedicated for developer of Builders.
Property decorator used to define a property delegation.
Override the property name.
the property name.
By default, the selection of the target element is done in the light DOM. This option forces the selection into the shadow DOM.
Define the select element
the CSS selector
Provide a fresh builder.
the type of the Custom Element
the property name, it's optional only when the decorator API (i.e. PropertyDelegationBuilder.decorate) is used
Generated using TypeDoc
The builder delegates the accesses of a property to an embedded element.
The CSS selector which targets the embedded element is handled with PropertyDelegationBuilder.to.
By default, the propagation selects an element in the Light DOM. Nevertheless, the selection can be done into the Shadow DOM with PropertyDelegationBuilder.shadow.
By default, the accesses are delegated to the target's property which matches the same name. However, the targeted property name can be changed with PropertyDelegationBuilder.property.
Moreover, instead of delegating to a property, the accesses can be delegated to an attribute using PropertyDelegationBuilder.attribute. In that case, the value can only be a
string
or aboolean
. If the value is aboolean
, then it has to be expressed with PropertyDelegationBuilder.booleanBoth PropertyDelegationBuilder.attribute and PropertyDelegationBuilder.property are exclusive.
Finally, the builder can be registered using the method ElementBuilder.builder of the main builder (i.e. ElementBuilder). However, it can also be registered with the decorative style using the decorator PropertyDelegationBuilder.decorate.