new WebComponent()
A base class for UI components extending the HTMLElement.
This class provides the core functionality for UI components including base properties and events.
Extends
Members
Events attached to the component.
Type:
Methods
(protected) cloneProperties(properties)
Clones component properties. This method should not be invoked by client code directly but only from inside component code.
Parameters:
| Name |
Type |
Description |
properties |
Object
|
The properties to clone. |
(async) connectedCallback()
Invoked when the element is added to the DOM. Renders the component if not already in the rendering state.
destroy(keepEvents, removeElement)
Parameters:
| Name |
Type |
Default |
Description |
keepEvents |
Boolean
|
|
A value indicating if component events should be kept. |
removeElement |
Boolean
|
true
|
A value indicating if the corresponding HTML Element should be removed. |
disconnectedCallback()
Invoked when the element is removed from the DOM. Cleans up the component.
getCssClass(classOption, cssClassValue) → {string}
Gets the CSS class name from the component property if it exists, otherwise returns the default CSS class.
Parameters:
| Name |
Type |
Description |
classOption |
Object
|
Object containing class options. |
cssClassValue |
string
|
Default CSS class value. |
Returns:
The resolved CSS class name.
-
Type
-
string
init()
Initializes the component with the specified properties.
(protected) postRender()
Executes the post render procedure. This method should not be invoked by client code directly but only from inside component code.
render(resourceHandler, defaultName, hasTheme)
Parameters:
| Name |
Type |
Description |
resourceHandler |
function
|
The callback method for registering script and css resources. |
defaultName |
String
|
The default name is used as default css class and when $UI.useCustomElementNames is enabled, as the element tag name prefixed by 'com'. |
hasTheme |
Boolean
|
A value indicating if the component has a CSS theme. |