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
{{ message }}
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.
Is your feature request related to a problem? Please describe.
Currently the software doesn't make it easy to get to the element of the component from JavaScript, just like with CSS.
Describe the solution you'd like
It would be nice to use a predefined variable which always references to the root element of the component. This reference can be generated programmatically and injected to top of the script. However to avoid variable collisions it would be smart to force the developer to create and export a function, where the software passes the reference to.
Acceptance criteria
The reference is component independent.
JavaScript code is imported and executed as a function with one argument.
Test data
Creating a script, should also create a file so it can be imported. JavaScript code could look like this:
export default function (element) {
// Do something with the element
}
Eventually the software will do something like this, similar to how it's done with CSS:
Is your feature request related to a problem? Please describe.
Currently the software doesn't make it easy to get to the element of the component from JavaScript, just like with CSS.
Describe the solution you'd like
It would be nice to use a predefined variable which always references to the root element of the component. This reference can be generated programmatically and injected to top of the script. However to avoid variable collisions it would be smart to force the developer to create and export a function, where the software passes the reference to.
Acceptance criteria
Test data
Creating a script, should also create a file so it can be imported. JavaScript code could look like this:
Eventually the software will do something like this, similar to how it's done with CSS:
The text was updated successfully, but these errors were encountered: