I want find the index of a given DOM node. It\'s like the inverse of doing
document.getElementById(\'id_of_element\').childNodes[K]
I want
A modern native approach might include Array.from(e.children).indexOf(theChild)
Array.from(e.children).indexOf(theChild)
No IE support, but Edge works: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from