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
I'm developing an addon to dynamically change the components' styles (they are built as web components with LitElement).
The code below does not work (the message does not get printed) because of the external variables (Button and buttonStyles). If I remove that line, "ahoy!" gets printed into the console.
Even a simple variable causes the function to not execute:
const a = 123;
export default {
...
parameters: {
brandchanger: {
definestyle: (brandName) => {
console.log(a); <--- does not recognize variable, despite it being declared at the same story file, and higher level context
},
},
}
};
Is that by design? Is it possible to make the parameters understand an outside variable, or, better yet, a callback that the addon can receive to execute when it finished loading
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm developing an addon to dynamically change the components' styles (they are built as web components with LitElement).
The code below does not work (the message does not get printed) because of the external variables (Button and buttonStyles). If I remove that line, "ahoy!" gets printed into the console.
Even a simple variable causes the function to not execute:
Is that by design? Is it possible to make the parameters understand an outside variable, or, better yet, a callback that the addon can receive to execute when it finished loading
Beta Was this translation helpful? Give feedback.
All reactions