Compare commits

..

No commits in common. "main" and "v0.0.1" have entirely different histories.
main ... v0.0.1

2 changed files with 3 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@lightweight-sdk/web-component",
"version": "0.0.2",
"version": "0.0.1",
"description": "A lightweight library to build web components easily",
"scripts": {
"build": "tsc -b",

View file

@ -58,13 +58,11 @@ export function CustomComponent<T extends ConstructorFunction<AbstractComponent>
}
// Apply any specified CSS classes to the component root element
if (p.cssClasses) {
this.classList.add(...p.cssClasses);
}
this.classList.add(...p.cssClasses);
// Process and link properties specified in __linkedProperties to their DOM elements
for (const requested of this.__linkedProperties ?? []) {
const elt = findRefElement(requested.ref, this);
const elt = findRefElement(requested.ref);
if (elt == null) {
throw new Error(`ref ${requested.ref} not found`);
}