docs: function insertChildAt(parentNode, childNode, index) {
    // By exploiting arrays returning `undefined` for an undefined index, we can
    // rely exclusively on `insertBefore(node, null)` instead of also using
    // `appendChild(node)`. However, using `undefined` is not allowed by all
    // browsers so we must replace it with `null`.
    parentNode.insertBefore(
      childNode,
      parentNode.childNodes[index] || null
    );
  }