Daniel Glazman wrote:
   myFooElement.querySelector("*:nth-child(3)") does NOT work since
   there can be another 3rd child in traversal order before the
   3rd child of myFooElement.

Being devil's advocate for a sec, having a :scope pseudo-class or some such would help here, right?

  myFooElement.querySelector(":scope > :nth-child(3)")

I do agree this is not nearly as clean as indexing....

-Boris

Reply via email to