One thing these articles aren't about is that your starting point. If you start with the entire DOM tree, these articles are really helpful.
However, if you have an element to start with, it depends on what your search is for. Most of my dynamic javascript with MVC templates tends to grab the element on which the action is performed and then search for the parent objects. This eliminates the need for a unique container name when they are randomly generated, making things much easier in terms of a dynamic detector.
When searching for the closest parent, a node may not be as fast as searching for an identifier, the performance should be small compared to the amount of time and / or the performance of generating and tracking several unique identifiers.
As with everything in development, โit dependsโ will reign here.
ps2goat
source share