def getChild(elem, index):
    JS("""
    var count = 0, child = @{{elem}}['firstChild'];
    while (child) {
      var next = child['nextSibling'];
      if (child['nodeType'] == 1) {
        if (@{{index}} == count)
          return child;
        ++count;
      }
      child = next;
    }

    return null;
    """)
Get a child of the DOM element by specifying an index.
dataset/ETHPy150Open pyjs/pyjs/pyjswidgets/pyjamas/DOM.browser.py/getChild