code: function indexOfContainingItem(element, target) {
    const items = element.items;
    const itemCount = items ? items.length : 0;
    for (let i = 0; i < itemCount; i++) {
      let item = items[i];
      if (item === target || item.contains(target)) {
        return i;
      }
    }
    return -1;
  }
docs: /*
  Return index of the element items that either is or contains the indicated
  target. Return -1 if not found.