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
Currently WidgetBunch.getattr is provided as a quick way to access children for which the identifier is known.
This works pretty well, but it might actually be the case where the id of a widget changes depending on the context where it is rendered. This has the side effect of forcing the developer to implement logic to cope with variables id when using w.children.child_name
While the id might change due to DOM requirements (avoiding collisions) or javascript requirements, the widget key will probably stay the same due to the controller code/layer being usually less variable than the presentation layer.
I know that most of this can be avoided by using automatic ids and referring only to classes for all the JS, semantic meaning and styling of the widgets. But that means that the user should stick to some rules that are not officially enforced by tw2 (I can freely change the id) and are not always enforceable.
Implementatioon should be quick, I can work out a pull request if everyone is fine with this.
The text was updated successfully, but these errors were encountered:
Currently WidgetBunch.getattr is provided as a quick way to access children for which the identifier is known.
This works pretty well, but it might actually be the case where the id of a widget changes depending on the context where it is rendered. This has the side effect of forcing the developer to implement logic to cope with variables id when using w.children.child_name
While the id might change due to DOM requirements (avoiding collisions) or javascript requirements, the widget key will probably stay the same due to the controller code/layer being usually less variable than the presentation layer.
I know that most of this can be avoided by using automatic ids and referring only to classes for all the JS, semantic meaning and styling of the widgets. But that means that the user should stick to some rules that are not officially enforced by tw2 (I can freely change the id) and are not always enforceable.
Implementatioon should be quick, I can work out a pull request if everyone is fine with this.
The text was updated successfully, but these errors were encountered: