Obtener índice de nodo infantil
Array.from(element.parentNode.children).indexOf(element)
Talented Tiger
Array.from(element.parentNode.children).indexOf(element)
Array.from(element.parentNode.children).indexOf(element)
[...element.parentNode.children].indexOf(element);