Having long selector would force it to go super deep, I would think.

Having long selector would force it to go super deep, I would think.
9 Replies
Eunomiac
Eunomiac4y ago
Even with the restriction to direct children with >?
Mana
ManaOP4y ago
Well, it'll probably try to find the lowest element first, which with long selector would be the deepest.
Eunomiac
Eunomiac4y ago
But only three levels deep, since the longest selector only digs down three levels, no?
Mana
ManaOP4y ago
I guess, but it would continue going deeper in case it's somewhere deeper.
Eunomiac
Eunomiac4y ago
Ahh, I see your point, it might keep searching for another '#top-elem' somewhere further down the line. Maybe a while loop that searches only one level on each iteration, and redeclares the root element to a level up each time, breaking out when you reach three iterations? Mmm, that feels clunky. I'm sure someone else will provide you with a much more elegant solution Sorry I couldn't have been more help!
Mana
ManaOP4y ago
Custom tree walking up the parent elements seems only way, but that brings all kinds of other problems.
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Leo The League Lion
@dunlee gave vote LeaguePoints™ to @ghost (#3 • 476)
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?