the type of the Custom Element
Change the targeted attribute name.
the attribute name.
This API is dedicated for developer of Builders.
Class decorator used to define an attribute propagation.
Propagate to a property.
the property name.
By default, the selection of the target elements is done in the light DOM. This option forces the selection into the shadow DOM.
The CSS selector used to select the DOM elements.
the CSS selector
Provide a fresh builder.
the type of the Custom Element
the attribute name or builder
Generated using TypeDoc
The builder handles the propagation of an attribute's values to embedded elements. That means, each time the attribute is mutated, the mutation is propagated to selected child nodes.
The attribute can be provided using its name or with an existing AttributeBuilder instance.
The CSS selector which targets the embedded elements is handled with AttributePropagationBuilder.to.
By default, the propagation selects elements in the Light DOM. Nevertheless, the selection can be done into the Shadow DOM with AttributePropagationBuilder.shadow.
By default, the propagation mutates the targets' attribute which matches the same name. However, the targeted attribute name can be changed with AttributePropagationBuilder.attribute. Moreover, instead of mutating an attribute, the propagation can mutate a property using AttributePropagationBuilder.property.
Both AttributePropagationBuilder.attribute and AttributePropagationBuilder.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 AttributePropagationBuilder.decorate.