feat: initial attach effect
This commit is contained in:
parent
cb8cba3c22
commit
2f01c4632c
1 changed files with 6 additions and 3 deletions
|
@ -95,7 +95,7 @@ export class WebComponent extends HTMLElement {
|
|||
this[property] = currentValue === "" || currentValue;
|
||||
this[camelCaps] = this[property]; // remove on v2
|
||||
|
||||
this.#handleUpdateProp(camelCaps, currentValue);
|
||||
this.#handleUpdateProp(camelCaps, this[property]);
|
||||
|
||||
this.render();
|
||||
this.onChanges({ property, previousValue, currentValue });
|
||||
|
@ -161,8 +161,11 @@ export class WebComponent extends HTMLElement {
|
|||
return true;
|
||||
},
|
||||
get(obj, prop) {
|
||||
Object.getPrototypeOf(obj[prop]).proxy = meta.#props;
|
||||
Object.getPrototypeOf(obj[prop]).prop = prop;
|
||||
// TODO: handle non-objects
|
||||
if(obj[prop] !== null && obj[prop] !== undefined) {
|
||||
Object.getPrototypeOf(obj[prop]).proxy = meta.#props;
|
||||
Object.getPrototypeOf(obj[prop]).prop = prop;
|
||||
}
|
||||
return obj[prop];
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue