the type of the Custom Element
Switch to the Array
type.
In this case, the output is an array of matched elements.
This API is dedicated for developer of Builders.
Property decorator used to define a property reference.
The CSS selector used to identify the child element(s).
the CSS selector
By default, the selection of the target element(s) is done in the light DOM. This option forces the selection into the shadow DOM.
Provide a fresh builder.
the type of the Custom Element
the property name, it's optional only when the decorator API (i.e. ReferenceBuilder.decorate) is used
Generated using TypeDoc
The builder enhances a readonly property to execute a CSS Selector once the property is get. So that, a property of the Custom Element can always be related to a child element or a set of child elements.
By default, the CSS selector targets a child element by its identifier (i.e. the attribute
id
) :#<PROPERTY NAME>
. The default CSS selector can be overridden with ReferenceBuilder.selector.By default, the selector targets only one child element, i.e.
querySelector(....)
. However, a selection of many child nodes, can be done with ReferenceBuilder.array, i.e.querySelectorAll(....)
.By default, the selection is done into the Light DOM. Nevertheless, the selection can be done into the Shadow DOM with ReferenceBuilder.shadow.
By default, the property type should be a specialization of
Element
. When the option ReferenceBuilder.array is used, the property type must be an Array ofElement
specializations.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 ReferenceBuilder.decorate.