Replies: 5 comments 3 replies
-
I do think that function names should distinguish children (understood by immediate children) and search all descendant elements. Take a look at how this is done in jQuery API: |
Beta Was this translation helpful? Give feedback.
-
I think in the end I would see just two functions for looking for children: And similar for parents: |
Beta Was this translation helpful? Give feedback.
-
@EduardKaverinskyi unless you have any other questions feel free to start working on that. The final function names can be decided later :) |
Beta Was this translation helpful? Give feedback.
-
One thing that came to my mind while developing this idea, is that it would be useful to have lambda functions in selectors. This way it will be very easy to find very specific objects using this module. For example: It will be also possible to check that object has the specified attribute with any value as following: What do you guys think? |
Beta Was this translation helpful? Give feedback.
-
Another thing that in my opinion would be useful is a function named is_highlightable(obj), which will return True or False and will be universal for the objects of different types and properties. It will be possible to find all highlightable objects very easily with: |
Beta Was this translation helpful? Give feedback.
-
We might want to have a module that provides support for common operations with the object tree. It can also have a function that is more flexible than squish.findAllObjects. It can use the object.children() method, and thus will be able to use object references as an argument.
Points:
Possible functions/methods:
Beta Was this translation helpful? Give feedback.
All reactions