You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make shadowProperties injectable.
So that the can be injeceted from outside the scope.
classItem{constructor(){defineShadowProperty(this,"prop1",{injectable: true});defineShadowProperty(this,"prop2",{injectable: true});}}constitem=newItem();// set from outside, where new instance is created// with this, you dont need to have passed n properties into the constructor.injectShadowPropertyValue(item,"prop1","foo");injectShadowPropertyValue(item,"prop2",false);console.log(item.prop1);// fooconsole.log(item.prop2);// false
No clue how to do that.
Implement a more complex logic, which may be a anti pattern/bad practice.
If implemented with getter/setter, make shadow property a special object?
Should shadow properties setteble from outiside? (Without injectable)
If they are settable from outside, whats the difference to "injectable"? injectable=true would only make sense, when the are not settable from outside.
See OpenHausIO/documentation#35
Add a file to "system/component/class.shadow-property.js":
The text was updated successfully, but these errors were encountered: