Rename the elements folder to components
This commit is contained in:
parent
e489da9666
commit
e49fa03fed
6 changed files with 1 additions and 1 deletions
|
|
@ -1,26 +0,0 @@
|
|||
import { Logger } from "../../utils/Logger.mjs";
|
||||
import { RipCryptBorder } from "./RipCryptBorder.mjs";
|
||||
import { RipCryptIcon } from "./Icon.mjs";
|
||||
import { RipCryptSVGLoader } from "./svgLoader.mjs";
|
||||
|
||||
const components = [
|
||||
RipCryptIcon,
|
||||
RipCryptSVGLoader,
|
||||
RipCryptBorder,
|
||||
];
|
||||
|
||||
export function registerCustomComponents() {
|
||||
(CONFIG.CACHE ??= {}).componentListeners ??= [];
|
||||
for (const component of components) {
|
||||
if (!window.customElements.get(component.elementName)) {
|
||||
Logger.debug(`Registering component "${component.elementName}"`);
|
||||
window.customElements.define(
|
||||
component.elementName,
|
||||
component,
|
||||
);
|
||||
if (component.formAssociated) {
|
||||
CONFIG.CACHE.componentListeners.push(component.elementName);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue