-
-
Notifications
You must be signed in to change notification settings - Fork 5
AbstractComponent
All components should inherit from this class because it contains useful properties that can be accessed in the child class.
A brief list of all class members with purposes.
Contains the attribute value of the element, which could be determined by the selector. Since this is a getter, the most recent value of the attribute is always returned, even if it changes during runtime.
Contains the element that could be determined by the selector. For example, the EventListener decorator attaches event listeners to this element.
This is the selector defined by the component decorator. With this variable, components can be defined dynamically so that the selector only has to be changed in one place.
public template: Template
The template property is still a bit experimental. A template selector can be specified via the component decorator, which then searches for a
If the property is not set, but a child element of this.element is an HTMLTemplateElement, then that element will be used as a template.
If the component element has the attribute data-template-source or data-template-source, the URL inside of this attribute will be used to get the template.
Contains all HTML elements found by the childSelectors property in the DOM.
The structure of this property could look like this:
[
'child-selector-a': Element[],
'child-selector-b': Element[],
...
]
Contains all options passed through the Component Decorator. This property is only used within the framework and can therefore be ignored.
- Classes
- Decorators
- CustomEvents
- Helpers
- Interfaces
- Polyfills